TOTP stands for Time-based One-Time Password. It’s a fairly simple algorithm that involves combining a shared secret key with the current time to generate a verification token that’s only valid for a short amount of time. This is a django app to implement OTP using gmail Qrcode.
Clone the Repo and install the requirements
git clone https://github.com/saadhaxxan/Django-2FA-2-Factor-Authentication
cd Django-2FA-2-Factor-Authentication
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
Go to http://localhost:8000/
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'yourgmail@gmail.com'
EMAIL_HOST_PASSWORD = 'yourpassword'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
To enable the option in Gmail: Sign in to your account in Gmail.com, then open another tab and go to the Less Safe Apps Setting and select "Open".
You can get in touch with me on my LinkedIn Profile:
You can also follow my GitHub Profile to stay updated about my latest projects:
If you liked the repo then kindly support it by giving it a star ⭐!
If you find any bug in the code or have any improvements in mind then feel free to generate a pull request.