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

supabase / supabase-flutter / 35596988338
94%

Build:
DEFAULT BRANCH: main
Ran 21 Sep 2026 12:01PM UTC
Jobs 11
Files 159
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

21 Sep 2026 11:59AM UTC coverage: 90.5%. Remained the same
35596988338

push

github

web-flow
fix(auth): report a malformed expires_in as an AuthException (#1863)

## Summary

`getSessionFromUrl` validates every other parameter it reads out of the
callback URL and throws an `AuthException` when one is missing, but
`expires_in` went straight into `int.parse` (`auth_client.dart:1353`). A
value the client cannot parse, such as `3600.0` or an empty
`expires_in=`, left the method as a raw `FormatException`.

That matters more than the error type, because `supabase_flutter`'s deep
link handler only republishes `AuthException`:

```dart
} on AuthException catch (error, stackTrace) {
  Supabase.instance.client.auth.notifyException(error, stackTrace);
} catch (error, stackTrace) {
  flutterLogger.warning('Error while getSessionFromUrl', error, stackTrace);
}
```

(`packages/supabase_flutter/lib/src/supabase_auth.dart:233-238`)

A `FormatException` is logged and dropped there, so nothing reaches
`onAuthStateChange` and an app waiting on that stream stays on "signing
in" with no way to know the link failed.

Closed issue #1687 hardened `Session.fromJson` against the same class of
input but did not reach this call site.

## Fix

Parse with `int.tryParse` alongside the existing guards and throw
`AuthException('Invalid expires_in detected.')`, matching the wording of
the guards above it. It runs before the `getUser` request, so a bad link
fails without a round trip.

## Not a breaking change

No public API changes. The only behaviour change is the exception type
on input that previously crashed out of the method.

## Tests

New `packages/supabase_auth/test/src/get_session_from_url_test.dart`,
backend free via `MockSupabaseHttpClient`:

- a whole-number `expires_in` still parses into the session
- `3600.0`, `1e3`, `abc` and an empty `expires_in=` each throw
`AuthException`

All four failure cases fail on main with `FormatException` raised from
`auth_client.dart:1353`, and pass with the fix.

Gates run in `packages/supabase_auth`: `dart format lib test -l 80
... (continued)

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

45 existing lines in 1 file now uncovered.

7869 of 8695 relevant lines covered (90.5%)

4.66 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
87.77
0.0% packages/supabase_auth/lib/src/auth_client.dart

Coverage Regressions

Lines Coverage ∆ File
45
87.77
0.0% packages/supabase_auth/lib/src/auth_client.dart
Jobs
ID Job ID Ran Files Coverage
6 iceberg - 35596988338.6 21 Sep 2026 12:01PM UTC 6
68.52
GitHub Action Run
7 supabase_flutter - 35596988338.7 21 Sep 2026 12:02PM UTC 14
77.87
GitHub Action Run
8 supabase_typegen - 35596988338.8 21 Sep 2026 12:02PM UTC 21
94.77
GitHub Action Run
9 supabase_functions - 35596988338.9 21 Sep 2026 12:01PM UTC 4
93.81
GitHub Action Run
10 postgrest - 35596988338.10 21 Sep 2026 12:04PM UTC 21
92.58
GitHub Action Run
11 supabase_storage - 35596988338.11 21 Sep 2026 12:03PM UTC 9
97.61
GitHub Action Run
7 supabase_realtime - 35596508134.7 21 Sep 2026 11:58AM UTC 13
90.66
GitHub Action Run
9 supabase_auth - 35596508134.9 21 Sep 2026 11:59AM UTC 32
92.0
GitHub Action Run
3 supabase - 35596508134.3 21 Sep 2026 11:59AM UTC 16
93.66
GitHub Action Run
6 yet_another_json_isolate - 34962811027.6 15 Sep 2026 11:22AM UTC 1
98.44
GitHub Action Run
2 supabase_common - 35344799042.2 18 Sep 2026 12:29PM UTC 22
87.36
GitHub Action Run
Source Files on build 35596988338
  • Tree
  • List 159
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #35596988338
  • 530afa43 on github
  • Prev Build on main (#35596508134)
  • Next Build on main (#35597390384)
  • 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