Skip to content

Commit 597f78f

Browse files
committed
Fix baseUrl that was broken in the previous patch
1 parent 3664aa5 commit 597f78f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/frameworks-sveltekit/src/lib/client.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export async function signIn<Redirect extends boolean = true>(
8484
...signInParams
8585
} = rest
8686

87-
const baseUrl = base ?? ""
87+
const baseUrl = `${base}/auth`
8888

8989
const signInUrl = `${baseUrl}/${
9090
provider === "credentials" ? "callback" : "signin"
@@ -150,7 +150,7 @@ export async function signOut<R extends boolean = true>(
150150
redirectTo = options?.callbackUrl ?? window.location.href,
151151
} = options ?? {}
152152

153-
const baseUrl = base ?? ""
153+
const baseUrl = `${base}/auth`
154154
const res = await fetch(`${baseUrl}/signout`, {
155155
method: "post",
156156
headers: {

packages/frameworks-sveltekit/src/lib/webauthn.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ async function webAuthnOptions(
2424
providerID: ProviderId,
2525
options?: Omit<SignInOptions, "redirect">
2626
) {
27-
const baseUrl = base ?? ""
27+
const baseUrl = `${base}/auth`
2828

2929
// @ts-expect-error
3030
const params = new URLSearchParams(options)
@@ -72,7 +72,7 @@ export async function signIn<Redirect extends boolean = true>(
7272
...signInParams
7373
} = rest
7474

75-
const baseUrl = base ?? ""
75+
const baseUrl = `${base}/auth`
7676

7777
if (!provider || provider !== "webauthn") {
7878
// TODO: Add docs link with explanation

0 commit comments

Comments
 (0)