• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-flutter / 37939731741
92%

Build:
DEFAULT BRANCH: main
Ran 09 Oct 2026 01:52PM UTC
Jobs 11
Files 175
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Oct 2026 01:50PM UTC coverage: 91.705%. Remained the same
37939731741

push

github

web-flow
fix(auth): only apply an updateUser response to the session of the same user (#1936)

Fixes #1931

## Problem

`updateUser` reads `currentSession` again once the request returns and
copies the returned user into it. If the user signs out and someone else
signs in while the request is in flight, the response overwrites the new
session's user, leaving user B's tokens paired with user A's profile,
and a `userUpdated` event is emitted for it.

## Fix

The returned user is only written into the stored session when its id
matches the session's user id. A session that changed for the same user
in the meantime (for example a refresh or a fresh sign in) still takes
the update.

## Tests

`update_user_race_test.dart` holds the `PUT /user` response open while
the session changes, and covers both cases: a different user signing in
is left untouched with no `userUpdated` event, and the same user with a
newer session still gets the update.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* User updates no longer overwrite a different user’s active session
when sign-in changes while an update is in progress.
* When the same user signs in again during an update, the returned
profile changes are applied without replacing the newer access token.
The user-updated event is emitted only when the response belongs to the
active user.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

2 of 2 new or added lines in 1 file covered. (100.0%)

40 existing lines in 1 file now uncovered.

9452 of 10307 relevant lines covered (91.7%)

5.25 hits per line

Coverage Regressions

Lines Coverage ∆ File
40
88.13
0.0% packages/supabase_auth/lib/src/auth_client.dart
Jobs
ID Job ID Ran Files Coverage
9 supabase_flutter - 37939731741.9 09 Oct 2026 01:52PM UTC 15
81.0
GitHub Action Run
10 iceberg - 37939731741.10 09 Oct 2026 01:52PM UTC 6
69.17
GitHub Action Run
11 supabase_functions - 37939731741.11 09 Oct 2026 01:52PM UTC 4
93.16
GitHub Action Run
10 supabase - 37789579735.10 08 Oct 2026 02:10PM UTC 18
94.33
GitHub Action Run
4 supabase_common - 37789579735.4 08 Oct 2026 02:06PM UTC 22
88.66
GitHub Action Run
6 supabase_realtime - 37789579735.6 08 Oct 2026 02:09PM UTC 14
91.11
GitHub Action Run
3 supabase_auth - 37789579735.3 08 Oct 2026 02:10PM UTC 32
92.16
GitHub Action Run
11 postgrest - 37789579735.11 08 Oct 2026 02:09PM UTC 30
93.93
GitHub Action Run
9 supabase_typegen - 37789579735.9 08 Oct 2026 02:08PM UTC 24
96.19
GitHub Action Run
2 supabase_storage - 37789579735.2 08 Oct 2026 02:09PM UTC 9
98.46
GitHub Action Run
11 yet_another_json_isolate - 37623283614.11 07 Oct 2026 12:48PM UTC 1
98.44
GitHub Action Run
Source Files on build 37939731741
  • Tree
  • List 175
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #37939731741
  • f09fbf93 on github
  • Prev Build on main (#37789579735)
  • Next Build on main (#37939928541)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc