diff --git a/packages/frameworks-sveltekit/src/lib/client.ts b/packages/frameworks-sveltekit/src/lib/client.ts index 5e708acdc3..a07cfffdb3 100644 --- a/packages/frameworks-sveltekit/src/lib/client.ts +++ b/packages/frameworks-sveltekit/src/lib/client.ts @@ -84,7 +84,7 @@ export async function signIn( ...signInParams } = rest - const baseUrl = base ?? "" + const baseUrl = `${base}/auth` const signInUrl = `${baseUrl}/${ provider === "credentials" ? "callback" : "signin" @@ -150,7 +150,7 @@ export async function signOut( redirectTo = options?.callbackUrl ?? window.location.href, } = options ?? {} - const baseUrl = base ?? "" + const baseUrl = `${base}/auth` const res = await fetch(`${baseUrl}/signout`, { method: "post", headers: { diff --git a/packages/frameworks-sveltekit/src/lib/webauthn.ts b/packages/frameworks-sveltekit/src/lib/webauthn.ts index 1847ea12eb..81657e6268 100644 --- a/packages/frameworks-sveltekit/src/lib/webauthn.ts +++ b/packages/frameworks-sveltekit/src/lib/webauthn.ts @@ -24,7 +24,7 @@ async function webAuthnOptions( providerID: ProviderId, options?: Omit ) { - const baseUrl = base ?? "" + const baseUrl = `${base}/auth` // @ts-expect-error const params = new URLSearchParams(options) @@ -72,7 +72,7 @@ export async function signIn( ...signInParams } = rest - const baseUrl = base ?? "" + const baseUrl = `${base}/auth` if (!provider || provider !== "webauthn") { // TODO: Add docs link with explanation