Skip to content

Commit

Permalink
Merge pull request #49 from lucasmblanco/main
Browse files Browse the repository at this point in the history
[RFC] Now the apiKey is sent independently, regardless of whether a session is active or not.
  • Loading branch information
djhi authored Jan 31, 2024
2 parents 15a32ed + a8ead0f commit 3398447
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/ra-supabase-core/src/dataProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ export const supabaseHttpClient =
// This ensures that users are identified correctly and that RLS can be applied
token: `Bearer ${data.session.access_token}`,
};
// This ensures the app is authorized to access the supabase instance
options.headers.set('apiKey', apiKey);
}
// Always send the apiKey even if there isn't a session
options.headers.set('apiKey', apiKey);

return fetchUtils.fetchJson(url, options);
};

0 comments on commit 3398447

Please sign in to comment.