Skip to content

fix: ensure identities are returned in a consistent order across DB engines#2465

Merged
fadymak merged 1 commit into
masterfrom
fm/auth-1155-identities-ordering
Apr 7, 2026
Merged

fix: ensure identities are returned in a consistent order across DB engines#2465
fadymak merged 1 commit into
masterfrom
fm/auth-1155-identities-ordering

Conversation

@fadymak

@fadymak fadymak commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Returns identities in a consistent order to work across DB engines.

Previously, we were relying on Postgres' implicit ordering which is considered an implementation detail and does not carry across to Oriole DB (https://github.com/supabase/auth/actions/runs/24069608972/job/70203207256?pr=2464).

Although we don't have an index on created_at, this should be fine since a user is unlikely to have many indexes and FindProvidersByUser filters by the user_id first.

Related: #2464

@fadymak fadymak requested a review from a team as a code owner April 7, 2026 08:34
Comment thread internal/models/identity.go
@fadymak fadymak merged commit e49a3e5 into master Apr 7, 2026
8 checks passed
@fadymak fadymak deleted the fm/auth-1155-identities-ordering branch April 7, 2026 16:57
fadymak pushed a commit that referenced this pull request Apr 28, 2026
🤖 I have created a release *beep* *boop*
---


##
[2.189.0](v2.188.1...v2.189.0)
(2026-04-23)


### Features

* add PKCE support for `/resend`
([#2401](#2401))
([2af904a](2af904a))
* improve parallelization in github workflows and Makefile
([#2436](#2436))
([9d0c4b3](9d0c4b3))
* **passkeys:** add CAPTCHA to options endpoint for authentication
([#2416](#2416))
([c7b58be](c7b58be))
* support live reloading of individual rate limits
([#2469](#2469))
([d03d796](d03d796))


### Bug Fixes

* ensure identities are returned in a consistent order across DB engines
([#2465](#2465))
([e49a3e5](e49a3e5))
* ensure SSO providers tests are order-independent
([#2466](#2466))
([983ade6](983ade6))
* exempt PKCE recovery sessions from require-current-password check
([#2502](#2502))
([7f88985](7f88985))
* **indexworker:** skip index creation on OrioleDB
([#2481](#2481))
([dd56ae9](dd56ae9))
* **passkeys:** modify the passkeys request and response shapes
([#2475](#2475))
([2d8f2b6](2d8f2b6))
* prevent reuse of flow state
([#2483](#2483))
([88dcb2d](88dcb2d))
* return JSON response for unmatched routes instead of plain text
([#2457](#2457))
([7337e21](7337e21))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants