-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
hard refresh on auth #3305
hard refresh on auth #3305
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -69,9 +66,9 @@ export function EmailPasswordForm({ | |||
if (loginResponse.ok) { | |||
if (isSignup && shouldVerify) { | |||
await requestEmailVerification(values.email); | |||
router.push("/auth/waiting-on-verification"); | |||
window.location.href = "/auth/waiting-on-verification"; |
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.
can we add a comment as to why we're doing this?
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.
it feels "wrong" to do this, so would love to have the justification here to alleviate future confusion
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.
also, would it be possible to just do a router.refresh() or similar?
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.
Sadly router.refresh doesn't trigger server side refresh for providers. Could use specific <Link attributes to trigger full refresh, but we'd need to either move our providers client side or have a global refresh we use for this redirect (which feels less maintainable than just triggering global update here).
Description
[Provide a brief description of the changes in this PR]
How Has This Been Tested?
[Describe the tests you ran to verify your changes]
Accepted Risk (provide if relevant)
N/A
Related Issue(s) (provide if relevant)
N/A
Mental Checklist:
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.