@base44/sdk 0.7.7 → 0.7.9
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
CHANGED
|
@@ -90,6 +90,8 @@ export function createAuthModule(axios, functionsAxiosClient, appId, options) {
|
|
|
90
90
|
window.localStorage) {
|
|
91
91
|
try {
|
|
92
92
|
window.localStorage.setItem("base44_access_token", token);
|
|
93
|
+
// Set "token" that is set by the built-in SDK of platform version 2
|
|
94
|
+
window.localStorage.setItem("token", token);
|
|
93
95
|
}
|
|
94
96
|
catch (e) {
|
|
95
97
|
console.error("Failed to save token to localStorage:", e);
|
package/dist/utils/auth-utils.js
CHANGED
|
@@ -65,6 +65,8 @@ export function saveAccessToken(token, options) {
|
|
|
65
65
|
}
|
|
66
66
|
try {
|
|
67
67
|
window.localStorage.setItem(storageKey, token);
|
|
68
|
+
// Set "token" that is set by the built-in SDK of platform version 2
|
|
69
|
+
window.localStorage.setItem("token", token);
|
|
68
70
|
return true;
|
|
69
71
|
}
|
|
70
72
|
catch (e) {
|
|
@@ -84,8 +84,9 @@ export function createAxiosClient({ baseURL, headers = {}, token, requiresAuth =
|
|
|
84
84
|
if (typeof window !== "undefined") {
|
|
85
85
|
config.headers.set("X-Origin-URL", window.location.href);
|
|
86
86
|
}
|
|
87
|
+
const requestId = uuidv4();
|
|
88
|
+
config.requestId = requestId;
|
|
87
89
|
if (isInIFrame) {
|
|
88
|
-
const requestId = uuidv4();
|
|
89
90
|
try {
|
|
90
91
|
window.parent.postMessage({
|
|
91
92
|
type: "api-request-start",
|