Get your Flask 2FA app running in 3 easy steps!
./run.shrun.batpython3 -m venv venvmacOS/Linux:
source venv/bin/activateWindows:
venv\Scripts\activatepip install -r requirements.txtpython app.pyOpen your browser and navigate to:
http://localhost:5000
- Register: Create a new account with username and password
- Login: Sign in with your credentials
- Dashboard: View your protected dashboard
- Enable 2FA (Optional):
- Click "Enable 2FA" on dashboard
- Scan QR code with authenticator app
- Enter verification code
- Done! 2FA is now active
- Google Authenticator (iOS/Android)
- Microsoft Authenticator (iOS/Android)
- Authy (iOS/Android)
- 1Password (iOS/Android/Desktop)
Press Ctrl + C in the terminal
rm app.db
python app.pydeactivateIf port 5000 is busy, edit app.py and change:
app.run(debug=True, host='0.0.0.0', port=5001) # Change to 5001Make sure virtual environment is activated:
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # WindowsClose any other instances of the app and delete app.db:
rm app.dbSee the full README.md for detailed documentation.
Happy coding! 🎉