1.0.7 • Published 6 years ago
multipass-qauth-frontend-lib v1.0.7
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-libConfigure 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 registerRegister
Call MultipassLib.signUp() after upload multipass and wtired passwordLog 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 nextSign 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 inRunning the project
$ yarn startSimple build for production
$ yarn build1.0.7
6 years ago