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

supabase / supabase-flutter / 39922342490
93%

Build:
DEFAULT BRANCH: main
Ran 23 Oct 2026 08:08AM 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

23 Oct 2026 08:06AM UTC coverage: 91.697% (+0.04%) from 91.657%
39922342490

push

github

web-flow
fix(realtime): keep the realtime access token in sync with third-party auth and every session change (#2016)

Realtime channels kept using a stale JWT in two cases, so realtime RLS
failed or saw the wrong identity.

## Changes

- **Third-party `accessToken` is asked on every heartbeat.**
`sendHeartbeat` passed the cached token to `setAccessToken`, which only
consults `customAccessToken` when given `null`, so the provider ran once
at connect and never again. Firebase, Auth0 and Clerk users lost
realtime once their first token expired. The heartbeat now calls
`setAccessToken(null)`, matching realtime-js. A throwing provider is
logged and the current token is kept, so the heartbeat timer never
surfaces an unhandled error.
- **Every session change reaches realtime.** `SupabaseClient` only
forwarded `initialSession`, `signedIn` and `tokenRefreshed`. Sessions
from `mfaChallengeVerified`, `passwordRecovery` and `userUpdated` (email
change redirects) left realtime on the previous token, for example still
aal1 after `mfa.verify`. Every event other than `signedOut` now forwards
its token, and `setAccessToken` already skips unchanged tokens.

## Tests

- `supabase_realtime/test/heartbeat_test.dart`: token rotation across
heartbeats with a custom provider, and a throwing provider keeping the
current token.
- `supabase/test/realtime_access_token_test.dart`: realtime follows
sign-in, refresh, sign-out (API key fallback), MFA verify, password
recovery and email change redirects.

Fixes SDK-2332


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

## Summary by CodeRabbit

* **Bug Fixes**
* Realtime connections now use the current authentication token after
sign-in, token refresh, MFA verification, and recovery or email-change
redirects. After sign-out, they fall back to the API key.
* Custom token providers are checked before acknowledged heartbeats so
realtime access can stay up to date. If token retrieva... (continued)

19 of 20 new or added lines in 2 files covered. (95.0%)

10735 of 11707 relevant lines covered (91.7%)

5.4 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
96.09
-0.13% packages/supabase_realtime/lib/src/realtime_client.dart
Jobs
ID Job ID Ran Files Coverage
3 supabase_realtime - 39922342490.3 23 Oct 2026 08:11AM UTC 14
91.18
GitHub Action Run
4 supabase - 39922342490.4 23 Oct 2026 08:12AM UTC 20
94.12
GitHub Action Run
5 supabase_functions - 39922342490.5 23 Oct 2026 08:08AM UTC 4
93.28
GitHub Action Run
6 supabase_flutter - 39922342490.6 23 Oct 2026 08:10AM UTC 16
80.84
GitHub Action Run
7 supabase_storage - 39922342490.7 23 Oct 2026 08:11AM UTC 10
96.26
GitHub Action Run
8 postgrest - 39922342490.8 23 Oct 2026 08:12AM UTC 28
91.26
GitHub Action Run
9 iceberg - 39922342490.9 23 Oct 2026 08:09AM UTC 6
71.32
GitHub Action Run
10 supabase_typegen - 39922342490.10 23 Oct 2026 08:09AM UTC 6
94.36
GitHub Action Run
11 supabase_auth - 39922342490.11 23 Oct 2026 08:13AM UTC 34
93.38
GitHub Action Run
10 supabase_common - 39779326806.10 22 Oct 2026 12:35PM UTC 35
93.58
GitHub Action Run
6 yet_another_json_isolate - 39779326806.6 22 Oct 2026 12:35PM UTC 1
98.44
GitHub Action Run
Source Files on build 39922342490
  • 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 #39922342490
  • e934c86d on github
  • Prev Build on main (#39780106395)
  • Next Build on main (#39926427044)
  • 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