Skip to content

Commit

Permalink
fix: add to server side as well
Browse files Browse the repository at this point in the history
  • Loading branch information
J0 committed Sep 12, 2024
1 parent 9db53b5 commit 0c7d2e1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/createServerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export function createServerClient<
},
true,
);
const storageKey = options?.auth?.storageKey || options?.cookieOptions?.name;

const client = createClient<Database, SchemaName, Schema>(
supabaseUrl,
Expand All @@ -167,9 +168,7 @@ export function createServerClient<
},
},
auth: {
...(options?.cookieOptions?.name
? { storageKey: options.cookieOptions.name }
: null),
...(storageKey ? { storageKey } : null),
...options?.auth,
flowType: "pkce",
autoRefreshToken: false,
Expand Down

0 comments on commit 0c7d2e1

Please sign in to comment.