@plusauth/web
TypeScript icon, indicating that this package has built-in type declarations

0.4.2 • Public • Published

@plusauth/web

PlusAuth helper utility intended to use in browsers.

Table of Contents

  1. Installation
  2. Usage
  3. Docs

Installation

From PlusAuth CDN (Make sure to check version):

<!-- Latest release -->
<script src="https://unpkg.com/@plusauth/web@0.3.1/dist/plusauth-web.umd.js"></script>

With npm:

$ npm install @plusauth/web

or with yarn

$ yarn add @plusauth/web

Usage

CDN Usage

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)

NPM Usage

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)

Docs

For API docs visit here

Readme

Keywords

none

Package Sidebar

Install

npm i @plusauth/web

Weekly Downloads

10

Version

0.4.2

License

MIT

Unpacked Size

169 kB

Total Files

10

Last publish

Collaborators

  • ayzagen