Description
When using createBrowserClient with the 'tokens-only' option, the getAll and setAll cookie methods are still required parameters. However, in the 'tokens-only' flow, session tokens are managed via getSession / setSession rather than cookies, so requiring cookie accessors is unnecessary and confusing.
Expected Behavior
createBrowserClient with 'tokens-only' should not require getAll and setAll cookie parameters, since the token-based flow bypasses cookie storage entirely.
// This should work without providing getAll/setAll
const supabase = createBrowserClient(SUPABASE_URL, SUPABASE_ANON_KEY, {
cookies: {
encode: 'tokens-only',
}
})
Current Behavior
TypeScript requires getAll and setAll to be provided even when using 'tokens-only', which forces users to pass in no-op stubs:
const supabase = createBrowserClient(SUPABASE_URL, SUPABASE_ANON_KEY, {
cookies: {
encode: 'tokens-only',
getAll: () => [], // unnecessary
setAll: () => {}, // unnecessary
},
})
Description
When using
createBrowserClientwith the'tokens-only'option, thegetAllandsetAllcookie methods are still required parameters. However, in the'tokens-only'flow, session tokens are managed viagetSession/setSessionrather than cookies, so requiring cookie accessors is unnecessary and confusing.Expected Behavior
createBrowserClientwith'tokens-only'should not requiregetAllandsetAllcookie parameters, since the token-based flow bypasses cookie storage entirely.Current Behavior
TypeScript requires
getAllandsetAllto be provided even when using'tokens-only', which forces users to pass in no-op stubs: