@base44-preview/sdk 0.7.8-pr.37.a0fad83 → 0.7.9-pr.38.a32a07c
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 +3 -1
- package/package.json +1 -1
package/dist/modules/auth.js
CHANGED
|
@@ -37,7 +37,9 @@ export function createAuthModule(axios, functionsAxiosClient, appId, options) {
|
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
39
|
// If nextUrl is not provided, use the current URL
|
|
40
|
-
const redirectUrl = nextUrl
|
|
40
|
+
const redirectUrl = nextUrl
|
|
41
|
+
? new URL(nextUrl, window.location.origin).toString()
|
|
42
|
+
: window.location.href;
|
|
41
43
|
// Build the login URL
|
|
42
44
|
const loginUrl = `${options.serverUrl}/login?from_url=${encodeURIComponent(redirectUrl)}&app_id=${appId}`;
|
|
43
45
|
// Redirect to the login page
|