Skip to content

fix(auth): check persistSession up front and give examples a storage - #1972

Merged
spydon merged 1 commit into
mainfrom
lukasklingsbo/sdk-2259-follow-up
Oct 16, 2026
Merged

spydon merged 1 commit into
mainfrom
lukasklingsbo/sdk-2259-follow-up

Conversation

@spydon

@spydon spydon commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #1971 for SDK-2259.

Changes

  • SupabaseClient now also catches persistSession: true without an asyncStorage up front, with its own message pointing at authOptions or persistSession: false. Before, that case fell through to the AuthClient message, which doesn't mention SupabaseClient, after the default HTTP client had already been created.
  • Removes the JSON codec dispose before the throw. YAJsonIsolate doesn't spawn a long-lived isolate, so there was nothing to clean up.
  • The supabase web example and the second client in the realtime room integration test now pass a MemoryAuthAsyncStorage. Since fix(auth)!: throw when a client has no asyncStorage for the pkce flow #1971, both throw when they are created.
  • Adds tests for the persisted-session error and for the AuthException from exchangeCodeForSession on an implicit-flow client without a storage.
  • Updates the SupabaseClient dartdoc and the MIGRATION.md section to match.

@github-actions github-actions Bot added the auth This issue or pull request is related to authentication label Oct 16, 2026
@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 25 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: supabase/supabase-flutter/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b8c45bb0-46a3-424c-b8de-c83a42401ed4
📥 Commits

Reviewing files that changed from the base of the PR and between 042d36d and efae3bf.

📒 Files selected for processing: 6
  • MIGRATION.md
  • examples/realtime_room/integration_test/room_test.dart
  • packages/supabase/example/web/main.dart
  • packages/supabase/lib/src/supabase_client.dart
  • packages/supabase/test/client_test.dart
  • packages/supabase_auth/test/client_test.dart
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@spydon
spydon enabled auto-merge (squash) October 16, 2026 13:04
@spydon
spydon merged commit 2640236 into main Oct 16, 2026
40 checks passed
@spydon
spydon deleted the lukasklingsbo/sdk-2259-follow-up branch October 16, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auth This issue or pull request is related to authentication

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant