-
Notifications
You must be signed in to change notification settings - Fork 2.2k
fix: password-reset route not working correctly #5744
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
Conversation
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
mikemurray
left a comment
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 see the reset password page, but cannot reset the password. The form hangs with a spinner forever after submitting it. The error I get is below.
errorClass {message: "Match error: Expected string, got undefined", path: "", sanitizedError: errorClass, errorType: "Match.Error", stack: "Error: Match error: Expected string, got undefined…4032cc20b589152bd2e905ef16f0748d26b2fa4:198317:5)"}
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
|
@mikemurray can you recheck this please? |
mikemurray
left a comment
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.
Reset seems to work, but I'm being redirected to a white screen with no console errors. I have the storefront urls set for both homepage and login url.
| throw new ReactionError("error-occurred", "Missing storefront URLs. Please set these properties from the shop settings panel."); | ||
| } else { | ||
| window.location.href = storefrontUrls.storefrontLoginUrl; | ||
| Router.go(storefrontUrls.storefrontLoginUrl); |
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.
This should still probably be window.location.href you're redirecting to a different site. Router.go is really only for push state within this app context.
Signed-off-by: Erik Kieckhafer <[email protected]>
mikemurray
left a comment
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.
👍
Resolves #5726
Impact: critical
Type: bugfix
Issue
The reset-password route does not correctly render the right component, making it impossible for you to reset your password unless you are under certain circumstances, like an admin who is logged in.
In addition, there was an issue related to this Password reset being a GQL mutation. On this page, there is no user, so
meteor-login-tokenis not set. However, we were setting that value tonull, instead of leaving it undefined. GQL was trying to usenullas an auth check, which was throwingUnauthorizederrors.By leaving the
meteor-login-tokenas undefined, we are able to use this mutation without being logged in /null.Solution
reset-password, and show the form if it is.meteor-login-tokenis a value orundefined, but notnullNotes
This does not fix the underlying problem, which is that the
reset-passwordroute doesn't register as it should and instead saysnot-foundfor thenameof the route. It provides a temporary fix to the issue we are seeing until we can move authentication to it's own app.Breaking changes
None.
Testing