Password Reset View
Learn how to reset passwords with views.
We'll cover the following...
We'll cover the following...
This lesson focuses on implementing the reset view.
Create a view for validating the password reset token
When a user clicks on a password reset link, we need to validate the password reset token—checking to see whether it has already been used, if it’s been tampered with, or if it’s expired. Let’s create the class.
In the code above:
- We have the
PasswordResetTokenValidationViewclass in line 10, which is responsible for the reset token validation. - The
get()request method in line 12 takes an instance, the request, the base64-encoded user ID (uidb64), and the password reset token as