Skip to content

Simple 2 factor authentication example how it could be implemented using hapi and speakeasy(Google Authenticator)

License

Notifications You must be signed in to change notification settings

Cheprer/two-factor-authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Two Factor Authentication

I've created simple 2 factor authentication example how it could be implemented using hapi and speakeasy(Google Authenticator). Views based on this project: https://github.com/dwyl/hapi-login-example

How to use it

Preconditions

Please make sure you have installed canvas to successfully to be able to initialize all packages Here is how: https://github.com/Automattic/node-canvas

npm i

npm start

Steps

  1. Login with simple authentication http://localhost:8000/ or http://localhost:8000/login In memory user: email: simple@be.org password:

  2. Get token from response and generate google auth secret http://localhost:8000/admin/googleauth?token=

  3. Scan QR Scan QR code to your Google Authenticator or add manually secret and enter 6 digit number and press verify

  4. Repeat step 1. you should be asked to add code from Google Authenticator after entering the credentials in a first step

About

Simple 2 factor authentication example how it could be implemented using hapi and speakeasy(Google Authenticator)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published