supabase / ssr

Supabase clients for use in server-side rendering frameworks.
MIT License
68 stars 7 forks source link

fix: add support for storage key #61

Open J0 opened 1 month ago

J0 commented 1 month ago

What kind of change does this PR introduce?

Address #19 to allow developer to configure storageKey when using createBrowserClient() client side. Not relevant for server-side as cookies are used there.

hf commented 1 month ago

Wait why not createServerClient? These values must be synced up, otherwise wrong cookies will be read.

J0 commented 1 month ago

Initial consideration was that on server side they'd be able to set it via: options?.cookieOptions?.name - was under impression from description that we primarily to want to allow the option of setting storageKey via options?.cookieOptions?.name on browser

It seems fine to allow this on createServerClient as well though. Pushed up to support on createServerClient as well