Skip to content

Flask-2fa is a demo application for two-factor authentication using flask and pyotp library.

License

Notifications You must be signed in to change notification settings

umessh/flask-2fa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flask-2fa

Flask-2fa is a demo application for two factor authentication using flask and pyotp library.

Steps to run the app

$ cd flask-2fa
$ python3 -m venv .
$ source bin/active
$ pip install -r src/requirements.txt
$ python src/app.py

Open the app in the browser using http:https://localhost:5000

Using the app

  • Run the app using above steps
  • Browse the app
  • Create account
  • Login into the app
  • Scan the QR code shown on the home page using Google Authenticator or Authy APP and save the 2FA settings
  • Enable the 2FA on the account in the app
  • Logout
  • Try logging in again
  • This time it will ask for code in addition to user and password login
  • Using the Google Authenticator or Authy get the code and use it
  • You should be logged in successfully

Note: This is not production ready app. If you see any errors, use private or incognito window (to start clean session without cookies).

About

Flask-2fa is a demo application for two-factor authentication using flask and pyotp library.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages