Skip to content

fix: restore auth session on app startup - #100

Merged
JakesMD merged 2 commits into
developfrom
fix/auth-state-persistence
Jul 2, 2026
Merged

fix: restore auth session on app startup#100
JakesMD merged 2 commits into
developfrom
fix/auth-state-persistence

Conversation

@JakesMD

@JakesMD JakesMD commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Initialize CCurrentUserCubit with authRepository.currentUser synchronously so the cubit's initial state reflects the persisted Supabase session before the auth stream emits
  • Add default currentUser stub to CTestClients
  • Add auth_state_persistence_test.dart to regression-test the fix

Test plan

  • Run flutter test test/pages/signin/ — all 4 tests pass
  • Launch app while signed in, close, reopen — lands on authenticated page, not signin

@JakesMD
JakesMD merged commit 58cc6b1 into develop Jul 2, 2026
1 check passed
@JakesMD
JakesMD deleted the fix/auth-state-persistence branch July 2, 2026 13:28
JakesMD added a commit that referenced this pull request Jul 2, 2026
* fix: restore auth session on app startup

* Add helpful comment

Co-authored-by: Jakes <71591438+JakesMD@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.

1 participant