Skip to content

Commit

Permalink
feat(auth): add cookieOptions for underliying auth client
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandolguevara committed Mar 28, 2022
1 parent 83db008 commit 608d93c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/SupabaseClient.ts
Expand Up @@ -229,6 +229,8 @@ export default class SupabaseClient {
localStorage,
headers,
fetch,
cookieOptions,
multiTab,
}: SupabaseClientOptions) {
const authHeaders = {
Authorization: `Bearer ${this.supabaseKey}`,
Expand All @@ -242,6 +244,8 @@ export default class SupabaseClient {
detectSessionInUrl,
localStorage,
fetch,
cookieOptions,
multiTab,
})
}

Expand Down
5 changes: 5 additions & 0 deletions src/lib/types.ts
Expand Up @@ -53,6 +53,11 @@ export type SupabaseClientOptions = {
* Throw errors, instead of returning them.
*/
shouldThrowOnError?: boolean

/**
* Options passed to the gotrue-js instance
*/
cookieOptions?: SupabaseAuthClientOptions['cookieOptions']
}

export type SupabaseRealtimePayload<T> = {
Expand Down

0 comments on commit 608d93c

Please sign in to comment.