Skip to content

Commit 3398447

Browse files
authored
Merge pull request #49 from lucasmblanco/main
[RFC] Now the apiKey is sent independently, regardless of whether a session is active or not.
2 parents 15a32ed + a8ead0f commit 3398447

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/ra-supabase-core/src/dataProvider.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ export const supabaseHttpClient =
6868
// This ensures that users are identified correctly and that RLS can be applied
6969
token: `Bearer ${data.session.access_token}`,
7070
};
71-
// This ensures the app is authorized to access the supabase instance
72-
options.headers.set('apiKey', apiKey);
7371
}
72+
// Always send the apiKey even if there isn't a session
73+
options.headers.set('apiKey', apiKey);
74+
7475
return fetchUtils.fetchJson(url, options);
7576
};

0 commit comments

Comments
 (0)