multipass-qauth-frontend-lib

1.0.7 • Public • Published

multipass-oauth-frontend-lib

Front end lib for using multipas auth


Requirements

For development, you will only need Node.js and a node global package, Yarn or npm, installed in your environement.

Install

yarn add multipass-oauth-frontend-lib
or 
npm i multipass-oauth-frontend-lib

Configure app

  1. you need to import { MultipassLib } from "multipass-oauth-frontend-lib"

To upload a file

MultipassLib.uploadFile(multipass, password)

PARAMS multipass - multipass zip file password - password for multipass

After upload a file that you can log in or register

Register

	Call MultipassLib.signUp() after upload multipass and wtired password

Log in

	You need to pull the email from multipass or write your email and call the method MultipassLib.authEmail(email)

Get QR code

	Call method 
    MultipassLib.getQRCode(
      token || null,
      QRContainer,
      { width: 200, height: 200 } - (params),
      "https://qr-auth.wdia.org/app" - (base link),
    )

PARAMS token - token for auth QRContainer - container for QR code rendering params - params for style qr code base link - link for a qr code redirect

After you need to go to the qr code link and execute the MultipassLib.checkToken(token), you will get a pin that you will need to enter next

Sign in authorization in the service

MultipassLib.signIn(token || null, pin) authorization in the service, you will get the result array if the first value is 1 then you are successfully logged in

Running the project

$ yarn start

Simple build for production

$ yarn build

Readme

Keywords

none

Package Sidebar

Install

npm i multipass-qauth-frontend-lib

Weekly Downloads

1

Version

1.0.7

License

ISC

Unpacked Size

65.8 kB

Total Files

8

Last publish

Collaborators

  • wdia