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 Nov 11, 2024
1 parent 0baf24c commit d5e8ebb
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 @@ -149,6 +149,7 @@ export function createServerClient<
},
true,
);
const storageKey = options?.auth?.storageKey || options?.cookieOptions?.name;

const client = createClient<Database, SchemaName, Schema>(
supabaseUrl,
Expand All @@ -163,9 +164,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 d5e8ebb

Please sign in to comment.