Skip to content

fix: allow cookies encode without getAll/setAll on browser client#213

Merged
mandarini merged 1 commit into
mainfrom
fix/tokens-only-without-cookie-methods
May 7, 2026
Merged

fix: allow cookies encode without getAll/setAll on browser client#213
mandarini merged 1 commit into
mainfrom
fix/tokens-only-without-cookie-methods

Conversation

@mandarini
Copy link
Copy Markdown
Contributor

createBrowserClient already falls back to document.cookie when cookies is omitted, but encode lives on the cookies object, so opting into tokens-only forced users to redeclare getAll/setAll (or pass no-op stubs that would break auth). The types were stricter than the runtime.

getAll and setAll are now optional on CookieMethodsBrowser. When both are omitted in a browser, the same document.cookie fallback is used. CookieMethodsServer is unchanged (no document.cookie there). The deprecated get/set/remove overload and the partial-omission case (only one of getAll/setAll provided) keep their existing behavior.

Closes #170

@mandarini mandarini self-assigned this May 7, 2026
@mandarini mandarini merged commit 89f3f28 into main May 7, 2026
4 checks passed
@mandarini mandarini deleted the fix/tokens-only-without-cookie-methods branch May 7, 2026 16:46
mandarini pushed a commit that referenced this pull request May 7, 2026
🤖 I have created a release *beep* *boop*
---


## [0.10.3](v0.10.2...v0.10.3)
(2026-05-07)


### Bug Fixes

* allow cookies encode without getAll/setAll on browser client
([#213](#213))
([89f3f28](89f3f28)),
closes [#170](#170)
* enable tree-shaking for browser bundles
([#216](#216))
([f009d71](f009d71))
* **tsconfig:** set explicit rootDir to silence TS6059 in consumer IDEs
([#211](#211))
([a77ee8a](a77ee8a)),
closes [#209](#209)
* validate base64-prefixed chunked cookies decode to valid JSON
([#210](#210))
([302cc0e](302cc0e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

createBrowserClient should not require getAll/setAll cookies when using 'tokens-only' flow

2 participants