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

supabase / supabase-flutter / 35579784083
94%

Build:
DEFAULT BRANCH: main
Ran 21 Sep 2026 08:49AM 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 08:47AM UTC coverage: 90.497%. Remained the same
35579784083

push

github

web-flow
fix(auth): list OAuth clients when the project has none (#1860)

`admin.oauth.listClients()` throws on a project that has no OAuth
clients, which is every project the first time someone looks at the
list.

`OAuthClientListResponse.fromJson` casts the key as non-null:

```dart
clients: (json['clients'] as List)
```

but the server marks it `omitempty`, in
`internal/api/oauthserver/handlers.go`:

```go
type OAuthServerClientListResponse struct {
	Clients []OAuthServerClientResponse `json:"clients,omitempty"`
}
```

and the list handler fills it with `make([]OAuthServerClientResponse,
len(clients))`. With no clients that is a zero-length slice, which
`omitempty` drops, so the response body is `{}` and the cast throws:

```
type 'Null' is not a subtype of type 'List<dynamic>' in type cast
```

The sibling admin API already guards the same shape, in
`auth_admin_custom_providers_api.dart`:

```dart
final providers = (data['providers'] as List?) ?? [];
```

so this follows that.

## Testing

`OAuthClientListResponse` had no unit test, so the new file covers both
a populated page and the empty response. The empty-response test
reproduces the crash above on `main` and passes with the fix.

The existing `list OAuth clients` integration test creates a client
before listing, which is why the empty case was never hit.

```
$ dart test test/src/types/ test/src/auth_admin_oauth_response_test.dart test/custom_oauth_provider_test.dart   # 123 passed
$ dart format lib test -l 80 --set-exit-if-changed   # 0 changed
$ dart analyze --fatal-infos .   # No issues found
```

Not a breaking change: `clients` stays non-nullable and is empty instead
of throwing.


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

## Summary by CodeRabbit

- **Bug Fixes**
- OAuth client list responses now handle missing or null client data
gracefully by returning an empty list.
- Empty responses now correctly provide default values for client totals
and optional paginat... (continued)

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

7866 of 8692 relevant lines covered (90.5%)

4.66 hits per line

Jobs
ID Job ID Ran Files Coverage
3 supabase - 35579784083.3 21 Sep 2026 08:52AM UTC 16
93.66
GitHub Action Run
4 supabase_flutter - 35579784083.4 21 Sep 2026 08:49AM UTC 14
77.87
GitHub Action Run
5 supabase_functions - 35579784083.5 21 Sep 2026 08:49AM UTC 4
93.81
GitHub Action Run
6 supabase_storage - 35579784083.6 21 Sep 2026 08:51AM UTC 9
97.61
GitHub Action Run
7 supabase_auth - 35579784083.7 21 Sep 2026 08:53AM UTC 32
91.99
GitHub Action Run
8 supabase_typegen - 35579784083.8 21 Sep 2026 08:50AM UTC 21
94.77
GitHub Action Run
9 iceberg - 35579784083.9 21 Sep 2026 08:49AM UTC 6
68.52
GitHub Action Run
10 supabase_realtime - 35579784083.10 21 Sep 2026 08:52AM UTC 13
90.66
GitHub Action Run
11 postgrest - 35579784083.11 21 Sep 2026 08:52AM UTC 21
92.58
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 35579784083
  • Tree
  • List 159
  • Changed 1
  • Source Changed 1
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #35579784083
  • 0955f37d on github
  • Prev Build on main (#35344799042)
  • Next Build on main (#35596508134)
  • 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