-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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(sveltekit): broken redirect to another origin when callbackUrl
contains a #
#10121
base: main
Are you sure you want to change the base?
fix(sveltekit): broken redirect to another origin when callbackUrl
contains a #
#10121
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@dievardump is attempting to deploy a commit to the authjs Team on Vercel. A member of the Team first needs to authorize it. |
callbackUrl
contains a #
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10121 +/- ##
=======================================
Coverage ? 38.73%
=======================================
Files ? 176
Lines ? 27892
Branches ? 1223
=======================================
Hits ? 10804
Misses ? 17088
Partials ? 0 ☔ View full report in Codecov by Sentry. |
I'm having trouble reproducing this, can you provide an minimal repro? 🙏 |
When a callbackUrl contains a
#
, signIn and signOut are automatically reloading the page, to ensure thre is a reload.However, if the redirect is supposed to redirect to another origin,
window.location.reload()
should not be performed, else it bypasses the window.location.hrefThis PR adds a check if the callbackUrl and the current url have the same origin, before allowing or not a
location.reload()