MFA is an important strategy for modern application security. This repository proides an example of how to implement optional MFA in Django using the PyOTP library.
IMPORTANT: This Django project is for demonstration purposes only, and is NOT suitable for production use.
- Install dependencies with Poetry
$ poetry install
or just use pip
$ pip install -r requirements.txt
- Create a user to log in as
$ python manage.py createsuperuser --username=[your_username] --email=[your_email]
- Run the Django development server
$ python manage.py runserver
- That's it! Visit http://localhost:8000 and log in. Once in, you can enable MFA from the profile screen.