PlusAuth helper utility intended to use in browsers.
From PlusAuth CDN (Make sure to check version):
<!-- Latest release -->
<script src="https://unpkg.com/@plusauth/[email protected]/dist/plusauth-web.umd.js"></script>
With npm:
$ npm install @plusauth/web
or with yarn
$ yarn add @plusauth/web
The library will be exposed to global as plusauthweb
Initialize it like following:
const plusAuth = new plusauthweb.PlusAuthWeb('https://<YOUR_TENANT_ID>.plusauth.com')
// access auth methods
plusAuth.auth.signIn({ username: 'test', password: 'test' })
// access mfa methods
plusAuth.mfa.validateCode('CODE', plusauthweb.MFACodeType.SMS)
import { PlusAuthWeb, MFACodeType } from '@plusauth/web'
const plusAuth = new PlusAuthWeb('https://<YOUR_TENANT_ID>.plusauth.com')
// access auth methods
plusAuth.auth.signIn({ username: 'test', password: 'test' })
// access mfa methods
plusAuth.mfa.validateCode('CODE', MFACodeType.SMS)
For API docs visit here