Skip to content

Commit

Permalink
fix: allow setting custom cookie name in createBrowserClient
Browse files Browse the repository at this point in the history
  • Loading branch information
kangmingtay committed Mar 5, 2024
1 parent a68e78b commit f897550
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/ssr/src/createBrowserClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ export function createBrowserClient<
({ cookies, isSingleton = true, cookieOptions, ...userDefinedClientOptions } = options);
}

if (cookieOptions?.name) {
userDefinedClientOptions.auth = {
...userDefinedClientOptions.auth,
storageKey: cookieOptions.name
};
}

const cookieClientOptions = {
global: {
headers: {
Expand Down

0 comments on commit f897550

Please sign in to comment.