-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: improve client-side submodules #12249
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
redirect: false
for client signIn
+ OAuth
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12249 +/- ##
==========================================
- Coverage 39.77% 39.64% -0.13%
==========================================
Files 192 192
Lines 30371 30460 +89
Branches 1337 1337
==========================================
- Hits 12079 12076 -3
- Misses 18292 18384 +92 ☔ View full report in Codecov by Sentry. |
These changes seem to have changed the sveltkit signin and signout endpoints to |
const _signInUrl = `${signInUrl}?${new URLSearchParams(authorizationParams)}` | ||
const signInUrl = `${baseUrl}/${ | ||
provider === "credentials" ? "callback" : "signin" | ||
}/${provider}` |
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.
You are missing the /auth
part of the path. This breaks the SvelteKit hooks.
async function webAuthnOptions( | ||
providerID: ProviderId, | ||
options?: Omit<SignInOptions, "redirect"> | ||
) { | ||
const baseUrl = base ?? "" | ||
|
||
// @ts-expect-error | ||
const params = new URLSearchParams(options) | ||
|
||
const optionsResp = await fetch( | ||
`${baseUrl}/webauthn-options/${providerId}?${params}` | ||
`${baseUrl}/webauthn-options/${providerID}?${params}` |
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.
Similarly, this creates the same issue by removing /auth
from the baseUrl
☕️ Reasoning
signIn
method.LiteralUnion
typeredirect: false
for OAuth providers in client-sidesignIn
. We already allowed this for the server-side version. In some cases, you might just want the URL before redirecting viawindow.location.href
, eg. you want to use a popup window to initiate the signin.signIn
andsignOut
methods. Now, unlessredirect: false
is explicitly added, these methods will returnvoid
.@auth/core/client
)🧢 Checklist
🎫 Affected issues
📌 Resources