For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

Reset Password

post

Final step in resetting a user's password.

Body
emailstring · emailRequired
passwordstringRequired
tokenstringRequired
Responses
201

Reset successful. Redirecting to next step...

application/json

Reset successful. Redirecting to next step...

redirect_tostringOptional
post/auth/reset
POST /auth/reset HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 59

{
  "email": "name@gmail.com",
  "password": "text",
  "token": "text"
}
201

Reset successful. Redirecting to next step...

{
  "redirect_to": "text"
}

Start Reset Password

post

Start a reset password attempt.

Body
emailstring · emailOptional
Responses
204

Forget password attempt created.

application/json
anyOptional

Forget password attempt created.

post/auth/forgot
POST /auth/forgot HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 26

{
  "email": "name@gmail.com"
}
204

Forget password attempt created.

No content

Changelog

  • 2024-12-20 - Initial Documentation

Last updated