Forget Password
The forgot password flow allows users to securely reset their password if they cannot log in. Users enter their registered email address to initiate the process, and an email with a time-sensitive reset link is sent to them.
Clicking the link directs the user to a secure form where they can set a new password. This flow ensures security by verifying the user’s identity through email and expiring the link after a short duration to prevent unauthorized access.
You can see the implementation below
https://github.com/madewithnovel/novel/blob/main/app/features/lifecycle/forgot.ts
https://github.com/madewithnovel/novel/blob/main/app/api/internal/v1/auth-forgot/index.ts
https://github.com/madewithnovel/novel/blob/main/app/api/internal/v1/auth-reset/index.ts
API
Final step in resetting a user's password.
POST /auth/reset HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 59
{
"email": "[email protected]",
"password": "text",
"token": "text"
}
Reset successful. Redirecting to next step...
{
"redirect_to": "text"
}
Start a reset password attempt.
Forget password attempt created.
POST /auth/forgot HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 26
{
"email": "[email protected]"
}
Forget password attempt created.
No content
Changelog
2024-12-20 - Initial Documentation
Last updated
Was this helpful?