Skip to content

Commit

Permalink
fix: circular auth fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
alaister committed Jun 29, 2022
1 parent 74ce9e3 commit e537ee7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SupabaseClient.ts
Expand Up @@ -97,9 +97,9 @@ export default class SupabaseClient<
this.headers = { ...DEFAULT_HEADERS, ...options?.headers }
this.shouldThrowOnError = settings.shouldThrowOnError || false

this.auth = this._initSupabaseAuthClient(settings.auth || {}, this.headers, settings.fetch)
this.fetch = fetchWithAuth(supabaseKey, this._getAccessToken.bind(this), settings.fetch)

this.auth = this._initSupabaseAuthClient(settings.auth || {}, this.headers, this.fetch)
this.realtime = this._initRealtimeClient({ headers: this.headers, ...settings.realtime })
this.rest = new PostgrestClient(`${_supabaseUrl}/rest/v1`, {
headers: this.headers,
Expand Down

0 comments on commit e537ee7

Please sign in to comment.