Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/modules/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ export function createAuthModule(
) {
try {
window.localStorage.setItem("base44_access_token", token);
// Set "token" that is set by the built-in SDK of platform version 2
window.localStorage.setItem("token", token);
} catch (e) {
console.error("Failed to save token to localStorage:", e);
}
Expand Down
2 changes: 2 additions & 0 deletions src/utils/auth-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ export function saveAccessToken(

try {
window.localStorage.setItem(storageKey, token);
// Set "token" that is set by the built-in SDK of platform version 2
window.localStorage.setItem("token", token);
return true;
} catch (e) {
console.error("Error saving token to localStorage:", e);
Expand Down
Loading