authentication-adal-pkg

1.0.51 • Public • Published

Authentication-pkg

General

This package implements authentication for web and native (>= iOS 10, >= Android 4.0.3 & UWP 10), included SSO with Microsoft Authenticator.

This package uses authentication from adal-angular and adal-cordova

Install

npm install authentication-adal-pkg

Usage

import { authentication } from 'authentication-adal-pkg';

API

authentication

Methods

initialize(config): void

Config is an object that should contain following properties:

  • tenant***
  • clientId***
  • redirectUriWeb*
  • redirectUriAndroid (and/or) redirectUriIos** (and/or) redirectUriWindows**
  • authority**
  • resourceUri**
  • loginPolicy
  • editProfilePolicy
  • changePasswordPolicy
  • userId**
  • loginResource

       *required for authentication web

       **required for authentication native

       ***required for authentication web & native

signIn() Promise<{token, error}>

signOut(): Promise<{}>

acquireToken(): Promise<token>

getTokenFromCache(): token

getUser(): Promise<{family_name, given_name, name, upn}>

getUserFromCache(): {family_name, given_name, name, upn}

Package Sidebar

Install

npm i authentication-adal-pkg

Weekly Downloads

3

Version

1.0.51

License

ISC

Unpacked Size

92.3 kB

Total Files

7

Last publish

Collaborators

  • donovands