@livedesk/client 0.1.228 → 0.1.229
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/bin/livedesk-client.js +4 -8
- package/package.json +1 -1
package/bin/livedesk-client.js
CHANGED
|
@@ -1383,14 +1383,10 @@ async function activateSupabaseSession(supabase, session) {
|
|
|
1383
1383
|
if (!normalized.ok) {
|
|
1384
1384
|
throw new Error(normalized.error);
|
|
1385
1385
|
}
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
throw new Error('refresh-token-required');
|
|
1391
|
-
}
|
|
1392
|
-
return activeSession;
|
|
1393
|
-
}
|
|
1386
|
+
// Always install the verified session into this exact Supabase client.
|
|
1387
|
+
// A freshly created client can read the persisted token through getSession()
|
|
1388
|
+
// before PostgREST has adopted its Authorization header. Skipping setSession
|
|
1389
|
+
// in that state makes the UI look signed in while table and RPC calls run as anon.
|
|
1394
1390
|
const { data, error } = await supabase.auth.setSession({
|
|
1395
1391
|
access_token: normalized.session.access_token,
|
|
1396
1392
|
refresh_token: normalized.session.refresh_token
|