Skip to content

Commit 70870f2

Browse files
authored
Merge pull request #415 from fernandolguevara/feat-auth
feat(auth): add cookieOptions for underliying auth client
2 parents badcad0 + 608d93c commit 70870f2

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
@@ -268,6 +268,8 @@ export default class SupabaseClient {
268268
localStorage,
269269
headers,
270270
fetch,
271+
cookieOptions,
272+
multiTab,
271273
}: SupabaseClientOptions) {
272274
const authHeaders = {
273275
Authorization: `Bearer ${this.supabaseKey}`,
@@ -281,6 +283,8 @@ export default class SupabaseClient {
281283
detectSessionInUrl,
282284
localStorage,
283285
fetch,
286+
cookieOptions,
287+
multiTab,
284288
})
285289
}
286290

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)