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

supabase / supabase-flutter / 37471661362
92%

Build:
DEFAULT BRANCH: main
Ran 06 Oct 2026 01:34PM UTC
Jobs 11
Files 174
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

06 Oct 2026 01:32PM UTC coverage: 91.5% (+0.003%) from 91.497%
37471661362

push

github

web-flow
fix(auth): refreshing a different invalid token signs out the current session (#1922)

## Problem

The guard around a failed token refresh compared a session version
number, not which refresh token the request redeemed. The version only
moves when the session is replaced, so a failed refresh of a token the
client never stored looked like a failed refresh of the stored session:

- User B is signed in. `refreshSession(tokenA)`, `setSession(tokenA)` or
`recoverSession` with another user's expired session sends a revoked
token A. The server answers `refresh_token_not_found`, the version is
unchanged, and the client removes B's session and emits `signedOut`.
- The `refresh_token_already_used` branch returned the stored session to
a caller who asked to refresh token A, handing B's session to whoever
held A.

## Change

`_doRefresh` now scopes the failure handling to the session the rejected
token belongs to:

- The stored session is handed back on `refresh_token_already_used`, or
removed with a `signedOut`, only while its refresh token is the one the
request redeemed.
- A refresh that started with no stored session, the recovery of an
expired persisted session on cold start, still signs out, but only while
nothing has been stored since. A user who signed in while that refresh
was in flight stays signed in.

The success path is unchanged: any sign-in bumps the version, so a stale
result is already discarded there.

No public API changes. Behaviour change on public paths: a foreign
token's `refresh_token_not_found` or `refresh_token_already_used` no
longer signs out or hands over the stored user. The `Sign out on wrong
refresh token` test in `client_test.dart` asserted the old behaviour and
now asserts the new one.

## Tests

New `refresh_token_ownership_test.dart`, built on
`MockSupabaseHttpClient`:

- `refreshSession` and `setSession` with a foreign rejected token keep
the stored session and emit no `signedOut`.
- A foreign `refresh_token_already_used` thro... (continued)

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

9301 of 10165 relevant lines covered (91.5%)

5.28 hits per line

Jobs
ID Job ID Ran Files Coverage
3 supabase_typegen - 37471661362.3 06 Oct 2026 01:36PM UTC 24
96.19
GitHub Action Run
4 iceberg - 37471661362.4 06 Oct 2026 01:34PM UTC 6
68.57
GitHub Action Run
5 supabase - 37471661362.5 06 Oct 2026 01:37PM UTC 18
94.3
GitHub Action Run
6 supabase_auth - 37471661362.6 06 Oct 2026 01:38PM UTC 32
92.14
GitHub Action Run
7 supabase_realtime - 37471661362.7 06 Oct 2026 01:37PM UTC 13
90.67
GitHub Action Run
8 supabase_functions - 37471661362.8 06 Oct 2026 01:34PM UTC 4
96.04
GitHub Action Run
9 postgrest - 37471661362.9 06 Oct 2026 01:37PM UTC 30
93.56
GitHub Action Run
10 supabase_flutter - 37471661362.10 06 Oct 2026 01:34PM UTC 15
81.0
GitHub Action Run
11 supabase_storage - 37471661362.11 06 Oct 2026 01:36PM UTC 9
98.1
GitHub Action Run
6 supabase_common - 37446858483.6 06 Oct 2026 10:02AM UTC 22
87.55
GitHub Action Run
6 yet_another_json_isolate - 36864123641.6 01 Oct 2026 12:48PM UTC 1
98.44
GitHub Action Run
Source Files on build 37471661362
  • Tree
  • List 174
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #37471661362
  • a10906f9 on github
  • Prev Build on main (#37470514274)
  • Next Build on main (#37477351863)
  • 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