supabase / auth-helpers

A collection of framework specific Auth utilities for working with Supabase.

Home Page:https://supabase.github.io/auth-helpers/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

why cookieOptions needs CookieMethods? - @supabase/ssr

pstachula-dev opened this issue · comments

Why we cannt create cookie options for createBrowserClient ?

I currently need to create an entire implementation of cookies serializer, but I would like to change just the cookie domain to be consistent with the serverClient.

 return createBrowserClient(ENV.SUPABASE_URL, ENV.SUPABASE_ANON_KEY, {
    cookieOptions: {
      domain: 'xxx'
    }
  });

Error:

 Property 'cookies' is missing in type '{ cookieOptions: { domain: string; }; }' but required in type '{ cookies: CookieMethods; cookieOptions?: CookieOptionsWithName | undefined; isSingleton?: boolean | undefined; }'.ts(2345)

This is a known issue. I'm unsure when it'll be addressed.

#682 (comment)

Let's track on #682