@everlast-brands/auth-adapter
TypeScript icon, indicating that this package has built-in type declarations

3.0.1 • Public • Published

Everlast Brands - Auth Adapter

Description

Optional package when developing new services for everlast brands. This package provides utilities for applications and users to manage identities and connects to our main Auth API.

Installation

yarn add @everlast-brands/auth-adapter
# or
npm install @everlast-brands/auth-adapter

Setup

import { AuthAdapter } from "@everlast-brands/auth-adapter";

export const authInit = authAdapter({
  enviornmentAddress: "http://127.0.0.1",
  appAPIKey: process.env.APP_API_KEY,
  appID: process.env.APP_ID,
});

Usage

Auth Adapter is used to interact with users identities which is helpful for authentication purposes. There are a number of ways this adapter can be used to provide authentication to client applications.

  1. Stateless Log in - Each time a request is made a stateless token commonly a JWT can be used to identify the requesting user and authenticate them with the system.
  2. Stateful Log in - Each time a request is made an arbitrary token preferably not a jwt is compared to a session stored on the server that authenticates the user.

Each has their advantages and disadvantages ranging from performance to security. This AuthAdapter, when configured correctly, will comunicate with the authentication server and facilitate communication.

Readme

Keywords

none

Package Sidebar

Install

npm i @everlast-brands/auth-adapter

Weekly Downloads

1

Version

3.0.1

License

ISC

Unpacked Size

12.5 kB

Total Files

10

Last publish

Collaborators

  • eb_dev