1.0.1 • Published 1 year ago

loyalty-auth v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Loyalty Auth

This package is useful for authenticating the user to Loyaltyone as a user (not valid for admin users)

Installation

To install the package, run the following command in your project directory:

npm i loyalty-auth

Configuration

Before using the methods, you need to configure your Loyalty credentials and the Loyalty User Pool details. This package assumes you have the following variables set:

CLIENT_ID: Your Loyalty Access Key ID.

REGION: The region your Loyalty User Pool is located in.

import LoyaltyAuth from "loyalty-auth";

async function loginUser() {
  try {
    const client = LoyaltyAuth.client("<CLIENT_ID>","<REGION>");
    const session:LoyaltyAuthLoginOutput = await client.login("<EMAIL_ADDRESS>","<PASSWORD>");
    // Use the session information as needed
  } catch (error) {
    console.error(error);
  }
}

loginUser();
1.0.1

1 year ago

1.0.0

1 year ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.12

1 year ago

0.0.13

1 year ago

0.0.14

1 year ago

0.0.15

1 year ago

0.0.9

1 year ago

0.0.16

1 year ago

0.0.8

1 year ago

0.0.17

1 year ago

0.0.5

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago