@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.
@@ -1383,14 +1383,10 @@ async function activateSupabaseSession(supabase, session) {
1383
1383
  if (!normalized.ok) {
1384
1384
  throw new Error(normalized.error);
1385
1385
  }
1386
- const { data: current } = await supabase.auth.getSession();
1387
- if (current?.session?.access_token === normalized.session.access_token) {
1388
- const activeSession = current.session;
1389
- if (!writeSavedSessionToFile(activeSession)) {
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livedesk/client",
3
- "version": "0.1.228",
3
+ "version": "0.1.229",
4
4
  "description": "LiveDesk local remote client",
5
5
  "type": "module",
6
6
  "bin": {