This project implements a secure and robust user authentication system in Django, featuring email registration with strong password constraints. Users can log in with their credentials, and in case of forgotten passwords, the system. This project implements a secure and robust user authentication system in Django, featuring email registration with strong password constraints. Users can log in with their credentials, and in case of forgotten passwords, the system offers an OTP-based email verification process. The OTP is valid for 40 seconds, with a limit of three resend attempts.
To enhance performance, Celery is used to handle email notifications and OTP delivery asynchronously, reducing delays caused by the SMTP server. The system also integrates middleware for added security, ensuring safe access to all pages and information.
Clone the project
https://github.com/Tirth9000/User-Authentication-Project-in-Django.gitInstall dependencies
pip install django, celery, redis, pymysql(for mysql connectivity)Apply makemigration
python manage.py makemigrations
python manage.py migrateStart Redis and Celery server
brew services start redis
celery -A auth_app beat --loglevel=infoStart the server
python manage.py runserverNow your app is ready.
To run this project, you will need to add the following environment variables to your .env file
EMAIL_HOST
EMAIL_PORT
EMAIL_HOST_USER
EMAIL_HOST_PASSWORD