Password Reset Endpoint

Learn how to create password reset endpoints.

We'll cover the following...

This lesson focuses on implementing the reset endpoint.

Create endpoints that facilitate password resets

In this lesson, we’ll create a few endpoints that work together to help the users reset their passwords. Let’s add the endpoints in main/urls.py, as shown below.

# imports ..
urlpatterns = [
# other paths ..,
# new
path('request-password-reset-email/', views.RequestPasswordResetEmailView.as_view(), name='request-password-reset-email'),
path('password-reset/<uidb64>/<token>/', views.PasswordResetTokenValidationView.as_view(), name='password-reset-confirm'),
path('password-reset/', views.SetNewPasswordView.as_view(), name='password-reset'),
]

In the code above:

  • The request-password-reset-email/ endpoint in line 7 is for requesting a password reset link via email. It requires an email address from the
...