Reputation: 186
I have some custom registration logic in my project and I want it to work this way:
User
is created. (Implemented)send_mail
with a single-use link to a password setup page. (Yet to
be implemented)What's the simplest way to create a single-use link and/or password reset token this using Django's default password reset mechanism?
Upvotes: 0
Views: 180
Reputation: 2470
You can use create the desired functionality by implementing very less code.
Follow the below steps:
PasswordResetTokenGenerator
classis_active
status to false
and send user an email with confirm email url containing the token. is_active
status to true
You can follow below link for a great tutorial for implementing confirm email functionality in django : https://medium.com/@frfahim/django-registration-with-confirmation-email-bb5da011e4ef
Upvotes: 1