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

supabase / supabase-flutter / 32016794095
89%

Build:
DEFAULT BRANCH: main
Ran 17 Aug 2026 09:46AM UTC
Jobs 9
Files 104
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

17 Aug 2026 09:45AM UTC coverage: 88.239%. Remained the same
32016794095

push

github

web-flow
fix(auth): fail with an AuthException when a redirect response has no url (#1728)

## What kind of change does this PR introduce?

Bug fix. Closes SDK-1497.

## What is the current behavior?

Two methods read a `url` out of an untyped response body without
checking it.

`getLinkIdentityUrl` handed the value straight to `OAuthResponse`:

```dart
return OAuthResponse(provider: provider, url: response['url']);
```

`getSSOSignInUrl` cast it:

```dart
return Uri.parse(response['url'] as String);
```

`strict-casts` is not enabled, so the first line compiles as an implicit
downcast. Both forms behave the same at runtime: if the server omits
`url`, or
sends a number or a list for it, the caller gets a bare `TypeError` from
whichever line consumes the value first, with nothing pointing at the
response
that caused it. A `TypeError` is also outside this package's exception
hierarchy, so callers that catch `AuthException` do not see it.

Worth being explicit about: adding an `as String` to the first line
would have
changed nothing at runtime. The implicit downcast already throws the
same
`TypeError` in the same place. Only a real check changes the behaviour.

## What is the new behavior?

Both call sites read the field through one helper that validates it and
throws
an `AuthException` at the response boundary:

```dart
String _urlFromResponse(dynamic response) {
  final url = response is Map ? response['url'] : null;
  if (url is! String) {
    throw AuthException('No url detected.');
  }
  return url;
}
```

The message follows the convention the client already uses for missing
response
fields (`No access_token detected.`, `No refresh_token detected.`, and
so on).
The `response is Map` guard means a body that is not an object at all, a
JSON
list for instance, reports the same error rather than a
`NoSuchMethodError`.

## Tests

`packages/supabase_auth/test/redirect_url_mock_test.dart` covers both
methods
against three malformed bodies each: field absent, field ... (continued)

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

23 existing lines in 1 file now uncovered.

5732 of 6496 relevant lines covered (88.24%)

4.11 hits per line

Coverage Regressions

Lines Coverage ∆ File
23
82.89
0.0% packages/supabase_auth/lib/src/auth_client.dart
Jobs
ID Job ID Ran Files Coverage
9 supabase_flutter - 32016794095.9 17 Aug 2026 09:46AM UTC 10
81.64
GitHub Action Run
9 supabase - 31805117378.9 14 Aug 2026 01:37PM UTC 13
87.19
GitHub Action Run
4 yet_another_json_isolate - 31785069647.4 14 Aug 2026 08:44AM UTC 1
94.44
GitHub Action Run
5 storage_client - 31804163356.5 14 Aug 2026 01:23PM UTC 13
85.03
GitHub Action Run
9 supabase_auth - 32009240063.9 17 Aug 2026 08:16AM UTC 27
89.72
GitHub Action Run
9 realtime_client - 31804163356.9 14 Aug 2026 01:24PM UTC 11
90.51
GitHub Action Run
6 functions_client - 31804163356.6 14 Aug 2026 01:21PM UTC 3
97.75
GitHub Action Run
4 supabase_common - 31804163356.4 14 Aug 2026 01:21PM UTC 16
99.48
GitHub Action Run
8 postgrest - 31804163356.8 14 Aug 2026 01:23PM UTC 10
85.46
GitHub Action Run
Source Files on build 32016794095
  • Tree
  • List 104
  • Changed 25
  • Source Changed 25
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #32016794095
  • 1a4801f2 on github
  • Prev Build on main (#32009240063)
  • Next Build on main (#32016936960)
  • 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