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

supabase / supabase-py / 43046355847
98%

Build:
DEFAULT BRANCH: main
Ran 11 Nov 2026 03:14PM UTC
Jobs 35
Files 134
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

11 Nov 2026 03:14PM UTC coverage: 97.417% (-0.003%) from 97.42%
43046355847

push

github

web-flow
feat(supabase): pull the realtime access token from the auth session (#2038)

## What

Realtime was handed a copy of the access token that the client keeps in
its `Authorization` header. That copy is only as fresh as the last auth
event, so after a missed auto refresh, for example when the process was
suspended or `auto_refresh_token` is off, realtime connected and joined
with an expired token until the next `TOKEN_REFRESHED` event.

`AsyncClient` now pulls the token from Auth on demand, the way
supabase-js, supabase-swift and supabase-flutter do: the callback it
gives realtime reads the session through `auth.get_session()`, which
refreshes an expiring session first. Realtime awaits that callback when
it connects, on every channel join and on every heartbeat.

Builds on #2037, which made realtime await the callback on every join
and push the token on every session change.

## Changes

### `supabase`

- `AsyncClient._realtime_access_token` returns the access token of
`auth.get_session()`. Without a session, or on a `with_token()` client
that has no auth, it returns the `Authorization` token of the client,
the API key by default, as before.
- A refresh that fails raises from `subscribe()`, so a channel is never
joined with a token that is known to be stale.

### `realtime`

- The heartbeat loop now logs a token callback that raises and keeps the
connection and the current token, instead of dying silently. Before, an
exception from the callback ended the heartbeat task, and the server
dropped the socket once the heartbeats stopped. A closed connection
still fails the connection as before. The log names only the type of the
error, since its message can contain a credential. The supabase client
logs a failed token push to realtime the same way.

### Docs and matrix

- The realtime README and the `token_callback` docstring say what
happens when the callback raises.
- The supabase README and the notes of
`client.authentication_integration.cross_client_token_... (continued)

12823 of 13163 relevant lines covered (97.42%)

5.06 hits per line

Coverage Regressions

Lines Coverage ∆ File
7
96.68
-0.29% src/realtime/client.py
2
97.77
0.03% src/supabase/client.py
Jobs
ID Job ID Ran Files Coverage
1 postgrest-py3.15-highest - 43046355847.1 11 Nov 2026 03:16PM UTC 29
98.45
GitHub Action Run
2 realtime-py3.13-highest - 43046355847.2 11 Nov 2026 03:15PM UTC 10
97.51
GitHub Action Run
3 supabase-py3.14-highest - 43046355847.3 11 Nov 2026 03:14PM UTC 20
99.32
GitHub Action Run
4 functions-py3.12-highest - 43046355847.4 11 Nov 2026 03:14PM UTC 14
99.12
GitHub Action Run
5 supabase-py3.12-lowest-direct - 43046355847.5 11 Nov 2026 03:14PM UTC 20
99.32
GitHub Action Run
6 utils-py3.14-highest - 43046355847.6 11 Nov 2026 03:15PM UTC 24
99.66
GitHub Action Run
7 utils-py3.15-highest - 43046355847.7 11 Nov 2026 03:15PM UTC 24
99.66
GitHub Action Run
8 supabase-py3.15-highest - 43046355847.8 11 Nov 2026 03:16PM UTC 20
99.32
GitHub Action Run
9 functions-py3.15-highest - 43046355847.9 11 Nov 2026 03:14PM UTC 14
99.12
GitHub Action Run
10 realtime-py3.15-highest - 43046355847.10 11 Nov 2026 03:15PM UTC 10
97.27
GitHub Action Run
11 postgrest-py3.14-highest - 43046355847.11 11 Nov 2026 03:16PM UTC 29
98.45
GitHub Action Run
12 supabase-py3.12-highest - 43046355847.12 11 Nov 2026 03:14PM UTC 20
99.32
GitHub Action Run
13 storage-py3.14-highest - 43046355847.13 11 Nov 2026 03:15PM UTC 24
95.99
GitHub Action Run
14 realtime-py3.12-highest - 43046355847.14 11 Nov 2026 03:15PM UTC 10
97.39
GitHub Action Run
15 functions-py3.12-lowest-direct - 43046355847.15 11 Nov 2026 03:14PM UTC 14
99.12
GitHub Action Run
16 auth-py3.14-highest - 43046355847.16 11 Nov 2026 03:16PM UTC 43
95.73
GitHub Action Run
17 auth-py3.13-highest - 43046355847.17 11 Nov 2026 03:16PM UTC 43
95.74
GitHub Action Run
18 utils-py3.12-highest - 43046355847.18 11 Nov 2026 03:15PM UTC 24
99.67
GitHub Action Run
19 storage-py3.12-highest - 43046355847.19 11 Nov 2026 03:16PM UTC 24
95.99
GitHub Action Run
20 storage-py3.12-lowest-direct - 43046355847.20 11 Nov 2026 03:16PM UTC 24
95.99
GitHub Action Run
21 utils-py3.13-highest - 43046355847.21 11 Nov 2026 03:15PM UTC 24
99.67
GitHub Action Run
22 realtime-py3.14-highest - 43046355847.22 11 Nov 2026 03:15PM UTC 10
97.15
GitHub Action Run
23 functions-py3.14-highest - 43046355847.23 11 Nov 2026 03:14PM UTC 14
99.12
GitHub Action Run
24 auth-py3.12-lowest-direct - 43046355847.24 11 Nov 2026 03:16PM UTC 43
95.74
GitHub Action Run
25 utils-py3.12-lowest-direct - 43046355847.25 11 Nov 2026 03:15PM UTC 24
99.67
GitHub Action Run
26 auth-py3.12-highest - 43046355847.26 11 Nov 2026 03:16PM UTC 43
95.74
GitHub Action Run
27 postgrest-py3.12-highest - 43046355847.27 11 Nov 2026 03:16PM UTC 29
98.45
GitHub Action Run
28 postgrest-py3.12-lowest-direct - 43046355847.28 11 Nov 2026 03:16PM UTC 29
98.45
GitHub Action Run
29 auth-py3.15-highest - 43046355847.29 11 Nov 2026 03:16PM UTC 43
95.73
GitHub Action Run
30 functions-py3.13-highest - 43046355847.30 11 Nov 2026 03:14PM UTC 14
99.12
GitHub Action Run
31 storage-py3.13-highest - 43046355847.31 11 Nov 2026 03:16PM UTC 24
95.99
GitHub Action Run
32 storage-py3.15-highest - 43046355847.32 11 Nov 2026 03:17PM UTC 24
95.99
GitHub Action Run
33 supabase-py3.13-highest - 43046355847.33 11 Nov 2026 03:14PM UTC 20
99.32
GitHub Action Run
34 realtime-py3.12-lowest-direct - 43046355847.34 11 Nov 2026 03:15PM UTC 10
97.39
GitHub Action Run
35 postgrest-py3.13-highest - 43046355847.35 11 Nov 2026 03:16PM UTC 29
98.45
GitHub Action Run
Source Files on build 43046355847
  • Tree
  • List 134
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #43046355847
  • 73a65b48 on github
  • Prev Build on main (#43038314079)
  • Next Build on main (#43227923044)
  • 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