hello! Question about sending custom emails and updating the password from the frontend.
I can override the
emailDelivery
on the backend, from the input I can get the
passwordResetLink
and from there I can extract the
token
from the URL params.
{
type: 'PASSWORD_RESET',
user: {
email: 'abc@gmail.com',
id: '83cb2c80-c119-4bbe-b191-4c1ab67a950c',
timeJoined: 1684502523294
},
passwordResetLink: 'http://localhost:3000/auth/reset-password?token=MTBjNzQwYThkZDdhZjk0YTUyODEzMGQ1YzZhM2NlY2E5ODkxNzQxNTM5M2M1ZmI0OGQ1OWJkMTIwYzBkODU5NjEzOWFiNzkxMjMyYjk3OTg0ZmMxYzZiMDY3MzQ5ODli&rid=emailpassword',
userContext: { _default: { request: [FastifyRequest] } }
}
Now from the frontend, after I get the token from the URL, and after the user provides the new password, I should use the
submitNewPassword
function to send the new password along with the token yes? But on the frontend I see that the types do not match what I see in the documentation. I know this document might be old, so I'm wondering if there's a new way of doing it, maybe including the token in the
FormFields
array?