Skip to content

Commit 50facc9

Browse files
committed
appbaseurl
1 parent 89aeee3 commit 50facc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/modules/auth.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export function createAuthModule(
6565
// Build the provider login URL (google is the default, so no provider path needed)
6666
const providerPath = provider === "google" ? "" : `/${provider}`;
6767
const loginUrl = `${
68-
options.serverUrl
68+
options.appBaseUrl
6969
}/api/apps/auth${providerPath}/login?app_id=${appId}&from_url=${encodeURIComponent(
7070
redirectUrl
7171
)}`;
@@ -96,7 +96,7 @@ export function createAuthModule(
9696
const fromUrl = redirectUrl || window.location.href;
9797

9898
// Redirect to server-side logout endpoint to clear HTTP-only cookies
99-
const logoutUrl = `${options.serverUrl}/api/apps/${appId}/auth/logout?from_url=${encodeURIComponent(fromUrl)}`;
99+
const logoutUrl = `${options.appBaseUrl}/api/apps/${appId}/auth/logout?from_url=${encodeURIComponent(fromUrl)}`;
100100
window.location.href = logoutUrl;
101101
}
102102
},

0 commit comments

Comments
 (0)