Skip to content

Commit 4889b09

Browse files
committed
refactor: add object destructuring on _initSupabaseAuthClient method
1 parent 7a03c0f commit 4889b09

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/SupabaseClient.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,22 @@ export default class SupabaseClient {
119119
return this.realtime.channels
120120
}
121121

122-
private _initSupabaseAuthClient(settings: SupabaseClientOptions) {
122+
private _initSupabaseAuthClient({
123+
autoRefreshToken,
124+
persistSession,
125+
detectSessionInUrl,
126+
localStorage,
127+
}: SupabaseClientOptions) {
123128
return new SupabaseAuthClient({
124129
url: this.authUrl,
125130
headers: {
126131
Authorization: `Bearer ${this.supabaseKey}`,
127132
apikey: `${this.supabaseKey}`,
128133
},
129-
autoRefreshToken: settings.autoRefreshToken,
130-
persistSession: settings.persistSession,
131-
detectSessionInUrl: settings.detectSessionInUrl,
132-
localStorage: settings.localStorage,
134+
autoRefreshToken,
135+
persistSession,
136+
detectSessionInUrl,
137+
localStorage,
133138
})
134139
}
135140

0 commit comments

Comments
 (0)