1.0.6 • Published 6 years ago

auth-ts v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

AuthTS - Typescript Library for OAuth utilizing Implicit Flow

Introduction

AuthTS provides a wrapper for the functionallity explained here.

IMPORTANT NOTE: Implicit Flow is less secure than explicit flows. SSL is required for AuthTS to be secure.

Installation

npm install auth-ts

Basic Usage

To use this package, you must register an App in Azure Active Directory. You may then initialize the secure class like so:

import * as Auth from 'auth-ts'

const APP_ID: string = 'my-app-token';
const secure = new Auth.Secure(APP_ID);

To login:

secure.login();

and to logout:

secure.logout();

Logging in will follow the implicit flow process and set a cookie in your browser with the returned JsonWebToken.

Secure has two public values: user & authorized. User contains the decoded jwt. Authorized is a boolean which indicates if a user is logged in or not.

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago