1.0.1 • Published 2 months ago

loyalty-auth v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months 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

2 months ago

1.0.0

2 months ago

0.0.10

2 months ago

0.0.11

2 months ago

0.0.12

2 months ago

0.0.13

2 months ago

0.0.14

2 months ago

0.0.15

2 months ago

0.0.9

2 months ago

0.0.16

2 months ago

0.0.8

2 months ago

0.0.17

2 months ago

0.0.5

2 months ago

0.0.7

2 months ago

0.0.6

2 months ago

0.0.4

2 months ago

0.0.3

2 months ago

0.0.2

2 months ago

0.0.1

2 months ago