-
Notifications
You must be signed in to change notification settings - Fork 212
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
fix(settings): Redirect from React email first with email param #18579
Conversation
832d49a
to
0b6cfad
Compare
// We can also use useNavigateWithQuery after addressing the above. | ||
params.delete('email'); | ||
const hasParams = params.size > 0; | ||
const isOAuth = location.pathname.startsWith('/oauth'); |
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.
Should this use the isOauthIntegration(integration) instead?
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.
Updated!
console.log( | ||
`${signupRoute}${hasParams ? `?${params.toString()}` : ''}` | ||
); | ||
navigate(`${signupRoute}${hasParams ? `?${params.toString()}` : ''}`, { |
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.
If params is empty, toString() will result in '' anyway, so I don't see the need for the ternary operator.
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.
Updated to use the URL API instead of this ternary.
Because: * Navigating to react email first with an email param was causing an infinite redirect This commit: * If an email is provided, check email status and redirect appropriately to signin or signup Closes #FXA-11327
Because
This pull request
Issue that this pull request solves
Closes: FXA-11327
Checklist
Put an
x
in the boxes that applyScreenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
Container tests will be added in follow-up
FXA-11316