Skip to content
This repository has been archived by the owner on Feb 7, 2018. It is now read-only.

Client side library for the authentication-server

License

Notifications You must be signed in to change notification settings

Neufund/authentication-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

authentication-client Build Status

Greenkeeper badge Client side library for the authentication-server

Example usage

Registration

const API_URL = 'http://localhost:3000';
const authenticator = new Authenticator(API_URL);
const otpSecret = await authenticator.register(email, password, captcha);
// Register otpSecret somewhere (e.g. show QR code for Google authenticator)

Login

const API_URL = 'http://localhost:3000';
const authenticator = new Authenticator(API_URL);
// Ask client for otpToken (2FA)
const jwt = await authenticator.login(email, password, otpToken);
// Use jwt to login

Install deps

yarn

Run tests

yarn test

About

Client side library for the authentication-server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published