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.
- Create a folder and put all the files inside it.
- Create a virtual environtment -
virtualenv env
- Activate VirtualENV -
source env/bin/activate
- Run requirements.txt -
pip3 install -r requirements.txt
- Run the Application -
python3 manage.py runserver
- Go to - http://localhost:8000/
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = '[email protected]'
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".