KeystoneJs 6 Forgot password on Signin page

23 Views Asked by At

I'm trying to implement a password reset functionality in my KeystoneJS 6 application. I've managed to configure email sending, and I've read the documentation regarding the ResetPasswordLink. However, I'm unsure how to add a "Forgot password" button on the login page to the Admin UI. Or how should I handle it when a user forgets their password and wants to set a new?

While examining the 'keystone-6-auth-pages-SigninPage.esm.js' file in node_modules, I discovered a built-in 'forgot password' mode. I can implement a 'Forgot password?' button like this:

jsx(Button, { weight: "none", tone: "active", onClick: () => setMode('forgot password') }, "Forgot Password?")));

However, I'm concerned this might not be an optimal solution. Are there better approaches to allowing users who forget their password to reset it?

0

There are 0 best solutions below