I want to create my own email verification flow, where the user enters his credentials and gets an OTP on the given email. When user enters the correct OTP within the time limit of 10 minutes, it will register the user and his credentials will be stored permanently in my database.
How do I store the credentials temporarily for a time limit of 10 minutes ?
I am thinking of storing the credentials after hashing using django_pbkdf2_sha256 library and storing it in my redis cache for a time of 10 minutes. If the user tries to enter it after this time, they will require a new OTP to register. Is this a good idea ?
Udaiveer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.