@base44-preview/sdk 0.8.18-pr.91.87dab3a → 0.8.18-pr.91.a4c0940
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modules/auth.js +2 -2
- package/package.json +1 -1
package/dist/modules/auth.js
CHANGED
|
@@ -40,7 +40,7 @@ export function createAuthModule(axios, functionsAxiosClient, appId, options) {
|
|
|
40
40
|
const redirectUrl = new URL(fromUrl, window.location.origin).toString();
|
|
41
41
|
// Build the provider login URL (google is the default, so no provider path needed)
|
|
42
42
|
const providerPath = provider === "google" ? "" : `/${provider}`;
|
|
43
|
-
const loginUrl = `${options.
|
|
43
|
+
const loginUrl = `${options.appBaseUrl}/api/apps/auth${providerPath}/login?app_id=${appId}&from_url=${encodeURIComponent(redirectUrl)}`;
|
|
44
44
|
// Redirect to the provider login page
|
|
45
45
|
window.location.href = loginUrl;
|
|
46
46
|
},
|
|
@@ -64,7 +64,7 @@ export function createAuthModule(axios, functionsAxiosClient, appId, options) {
|
|
|
64
64
|
// Determine the from_url parameter
|
|
65
65
|
const fromUrl = redirectUrl || window.location.href;
|
|
66
66
|
// Redirect to server-side logout endpoint to clear HTTP-only cookies
|
|
67
|
-
const logoutUrl = `${options.
|
|
67
|
+
const logoutUrl = `${options.appBaseUrl}/api/apps/${appId}/auth/logout?from_url=${encodeURIComponent(fromUrl)}`;
|
|
68
68
|
window.location.href = logoutUrl;
|
|
69
69
|
}
|
|
70
70
|
},
|