-
Notifications
You must be signed in to change notification settings - Fork 24
recoverAccount workflow #28
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
Comments
i dont think so. im not sure why i commented out that line in runRoutes. i think there was a PR complaining about this a while back but i dont think i accepted it. (edit: ah - i think this is because it’s better implemented in react-netlify-identity-widget? thats what i use anyway) in any case - please feel free to PR what you think should be done - you have clearly done all the necessary research to fully understand this problem. I’m not currently active on this project right now but could very well come back to it at any time |
Brainstorming here a little, let me know if this is over the top.
{
token: string | undefined,
type: 'confirmation' | 'invite' | 'recovery' | 'email_change' | 'access' | 'confirmation' | undefined
} which sets it to a new internal state const { replace } = useHistory();
const { param: { token, type }, user } = useIdentityContext();
if(token) {
switch(type) {
case 'recovery':
replace('/settings/change-password');
break;
// etc
}
return null;
} Also, |
this is an interesting approach! i was tempted to suggest returning an array of tokens, but realistically i dont think that is ever going to happen. so i think this works. if you'd like to try a PR, be my guest, if not i'll take a crack whenever i get back to this |
Hi, so I've been tinkering with a reset-password route for a while and found this issue:
requestPasswordRecovery(mail)
-> netlify sends out reset mailrunRoutes
triggers and... well, does nothing - which I guess is fine, just a heads up in the docs would've been nicerecoverAccount(token)
fetches a User object based on the verified token but performs no login, valid tooupdateUser({ password })
- but becauserecoverAccount(token)
didn't change any lib internal state, it throws theare you logged in
error.user
is no longer nulluser!.update(fields).then(_setUser)
in another effect where I have to ignore errors thrown from the lib - not sure why these are triggeredIt's finally working but imo that's a mess. Am I doing something massively wrong here?
The text was updated successfully, but these errors were encountered: