From b5349232abdbe6cbdc0470c49fbc717890c80a40 Mon Sep 17 00:00:00 2001 From: Netanel Gilad Date: Sun, 5 Oct 2025 16:02:29 +0300 Subject: [PATCH] set token on "token" key in local storage as well --- src/modules/auth.ts | 2 ++ src/utils/auth-utils.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/modules/auth.ts b/src/modules/auth.ts index 651e941..af6416f 100644 --- a/src/modules/auth.ts +++ b/src/modules/auth.ts @@ -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); } diff --git a/src/utils/auth-utils.ts b/src/utils/auth-utils.ts index b31e1b5..76a10aa 100644 --- a/src/utils/auth-utils.ts +++ b/src/utils/auth-utils.ts @@ -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);