Skip to content

Commit 608d93c

Browse files
feat(auth): add cookieOptions for underliying auth client
1 parent 83db008 commit 608d93c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/SupabaseClient.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ export default class SupabaseClient {
229229
localStorage,
230230
headers,
231231
fetch,
232+
cookieOptions,
233+
multiTab,
232234
}: SupabaseClientOptions) {
233235
const authHeaders = {
234236
Authorization: `Bearer ${this.supabaseKey}`,
@@ -242,6 +244,8 @@ export default class SupabaseClient {
242244
detectSessionInUrl,
243245
localStorage,
244246
fetch,
247+
cookieOptions,
248+
multiTab,
245249
})
246250
}
247251

src/lib/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ export type SupabaseClientOptions = {
5353
* Throw errors, instead of returning them.
5454
*/
5555
shouldThrowOnError?: boolean
56+
57+
/**
58+
* Options passed to the gotrue-js instance
59+
*/
60+
cookieOptions?: SupabaseAuthClientOptions['cookieOptions']
5661
}
5762

5863
export type SupabaseRealtimePayload<T> = {

0 commit comments

Comments
 (0)