Password Reset Endpoint

Learn how to create password reset endpoints.

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.

Press + to interact
# 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
...