Skip to content

Commit

Permalink
feat: Use additional headers from SupabaseClient into GotrueClient. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tartard committed Aug 19, 2021
1 parent 60e8c2a commit bbe9a55
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/SupabaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,15 @@ export default class SupabaseClient {
persistSession,
detectSessionInUrl,
localStorage,
headers
}: SupabaseClientOptions) {
const authHeaders = {
Authorization: `Bearer ${this.supabaseKey}`,
apikey: `${this.supabaseKey}`,
}
return new SupabaseAuthClient({
url: this.authUrl,
headers: {
Authorization: `Bearer ${this.supabaseKey}`,
apikey: `${this.supabaseKey}`,
},
headers: { ...headers, ...authHeaders },
autoRefreshToken,
persistSession,
detectSessionInUrl,
Expand Down

0 comments on commit bbe9a55

Please sign in to comment.