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

supabase / auth / 29920946770
72%

Build:
DEFAULT BRANCH: master
Ran 22 Jul 2026 12:50PM UTC
Jobs 1
Files 196
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

22 Jul 2026 12:45PM UTC coverage: 71.869% (+0.1%) from 71.742%
29920946770

push

github

web-flow
feat: add cursor-based pagination for admin users list (#2633)

## What

Adds cursor-based (keyset) pagination to `GET /admin/users`, behind a
new
experimental feature flag. Offset pagination's `COUNT(*)` + `OFFSET`
deep-scan
is the primary cause of request timeouts on large user tables; keyset
paging
removes both, making page fetches constant-time regardless of how deep
you page.

  ## Feature flag

  `GOTRUE_EXPERIMENTAL_CURSOR_PAGINATION_ENABLED` (default `false`) →
  `Experimental.CursorPaginationEnabled`.

**Nothing changes unless you opt in.** With the flag off, the endpoint
behaves
  exactly as today. Mode selection:

  ## API (cursor mode)

  Request: `GET /admin/users?limit=50&cursor=<opaque>`
  - `limit`: default 50, capped at 1000, `0`/invalid → 400
- `cursor`: opaque base64url token; absent = first page; malformed → 400

  Response adds a `pagination` block and a `Link: rel="next"` header:
  ```json
  { "users": [ ... ], "aud": "authenticated",
    "pagination": { "next_cursor": "eyJ...", "has_more": true } }
```
`next_cursor`/`Link` are omitted on the last page. No X-Total-Count in cursor
mode: `has_more` signals whether more pages exist. Forward-only for now.

##   Notes

  - Orders by (created_at, id); the id tiebreaker is required because creaxed_at isn't unique (batch/seeded/migrated users share timestamps).
  - No migration: reuses the existing idx_users_created_at_desc
  - Cursors are opaque but unsigned; aud/instance_id filters still apply, so tampering only yields a different valid start point or a 400, never unauthorized data.
  - Scoped to `adminUsers` now ; the cursor helper is built to be reused for OAuth clients and audit logs in a follow-up.

134 of 142 new or added lines in 3 files covered. (94.37%)

3 existing lines in 1 file now uncovered.

18223 of 25356 relevant lines covered (71.87%)

663.22 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
68.47
1.94% internal/api/admin.go
4
77.65
0.88% internal/models/user.go

Coverage Regressions

Lines Coverage ∆ File
3
59.47
-0.62% internal/api/oauthserver/handlers.go
Jobs
ID Job ID Ran Files Coverage
1 29920946770.1 22 Jul 2026 12:50PM UTC 196
71.87
GitHub Action Run
Source Files on build 29920946770
  • Tree
  • List 196
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 76e2aace on github
  • Prev Build on master (#29899212170)
  • Next Build on master (#29930047595)
  • 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