-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: smtp for password reset #4630
Conversation
body: JSON.stringify(params), | ||
}); | ||
if (!response.ok) { | ||
setError("Failed attempt"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error is not clear - make the message more clear to the user what might be wrong
setError("Failed attempt"); | ||
return; | ||
} | ||
} catch (error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure you need this try catch here
body: JSON.stringify(params), | ||
}); | ||
if (!response.ok) { | ||
setError("Failed attempt"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a better error message
return; | ||
} | ||
} catch (error) { | ||
setError("Failed attempt"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs a better error message
setMessage( | ||
"A link to reset your password has been sent. Check your email for details." | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can do the follow-up but this typically swaps out the UI
const token = searchParams.get("token"); | ||
if (!token) { | ||
navigate("/login"); | ||
return null; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably just show an error. We need a "back to login" link anyways. Redirecting typically should happen on user-action - it might be confusing otherwise.
resolves #4602
resolves #4054
resolves #4055