Skip to content

feat: implement link identity with oidc / native sign in - #2108

Merged
hf merged 5 commits into
masterfrom
hf/link-identity-oidc
Aug 28, 2025
Merged

hf merged 5 commits into
masterfrom
hf/link-identity-oidc

Conversation

@hf

@hf hf commented Aug 8, 2025

Copy link
Copy Markdown
Contributor

Implements linking an OIDC identity to a user. It works by modifying the existing /token?grant_type=id_token endpoint by allowing a link_identity body parameter.

If it's set, the Authorization header must be set to a valid JWT representing a user. This user will be the user to which the ID token's identity will be linked to.

@cemalkilic cemalkilic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a concern about the selective middleware, the rest looks good 🚀

Comment thread internal/api/auth.go Resolved
@coveralls

coveralls commented Aug 9, 2025 •

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 17293758063

Details

  • 1 of 23 (4.35%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.07%) to 70.664%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/api/token_oidc.go 0 22 0.0%
Totals Coverage Status
Change from base Build 17291564711: -0.07%
Covered Lines: 12374
Relevant Lines: 17511

💛 - Coveralls

@hf
hf force-pushed the hf/link-identity-oidc branch from 711321d to 1966708 Compare August 26, 2025 13:19
@hf

hf commented Aug 26, 2025

Copy link
Copy Markdown
Contributor Author

Force push is rebase.

@hf
hf force-pushed the hf/link-identity-oidc branch from 1966708 to e75fb59 Compare August 28, 2025 10:57
@hf
hf merged commit 5f0ec87 into master Aug 28, 2025
@hf
hf deleted the hf/link-identity-oidc branch August 28, 2025 11:37
hf pushed a commit that referenced this pull request Aug 28, 2025
🤖 I have created a release *beep* *boop*
---


##
[2.179.0](v2.178.0...v2.179.0)
(2025-08-28)


### Features

* add oauth2 client support
([#2098](#2098))
([8fae015](8fae015))
* experimental own linking domains per provider
([#2119](#2119))
([747bf3b](747bf3b))
* fetch email from snapchat oauth provider if available for consistency
([#2110](#2110))
([7507822](7507822))
* implement link identity with oidc / native sign in
([#2108](#2108))
([5f0ec87](5f0ec87))
* implements email-less accounts with oauth
([#2105](#2105))
([9a61dae](9a61dae))
* introduce request-scoped background tasks & async mail sending
([#2126](#2126))
([2c8ea61](2c8ea61))
* refactor mailer client wiring and add validation wrapper
([#2130](#2130))
([68c40a6](68c40a6))
* support multiple `aud` for the external providers
([#2117](#2117))
([ca5792e](ca5792e))
* use `slices.Contains` instead of for loops
([#2111](#2111))
([9f22682](9f22682))


### Bug Fixes

* add `id-token` permission to ci
([#2143](#2143))
([79209c0](79209c0))
* add missing param
([#2125](#2125))
([c0b75f6](c0b75f6))
* change s3 artifact upload role
([#2145](#2145))
([767e371](767e371))
* remove requirement of empty content-type on 204
([#2128](#2128))
([ecc97e0](ecc97e0))
* run release-please again
([#2144](#2144))
([2560f14](2560f14))
* stripped binary now includes version
([#2147](#2147))
([609f169](609f169))
* update copyright year in LICENSE
([#2142](#2142))
([67fe0b0](67fe0b0))

---
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: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
hf added a commit to supabase/auth-js that referenced this pull request Sep 24, 2025
Adds `linkIdentity()` method which allows passing OIDC credentials. The
ID token will be linked to the currently signed in user.

See also:
- supabase/auth#2108
fadymak pushed a commit that referenced this pull request Sep 30, 2025
Implements linking an OIDC identity to a user. It works by modifying the
existing `/token?grant_type=id_token` endpoint by allowing a
`link_identity` body parameter.

If it's set, the `Authorization` header must be set to a valid JWT
representing a user. This user will be the user to which the ID token's
identity will be linked to.
fadymak pushed a commit that referenced this pull request Sep 30, 2025
🤖 I have created a release *beep* *boop*
---


##
[2.179.0](v2.178.0...v2.179.0)
(2025-08-28)


### Features

* add oauth2 client support
([#2098](#2098))
([8fae015](8fae015))
* experimental own linking domains per provider
([#2119](#2119))
([747bf3b](747bf3b))
* fetch email from snapchat oauth provider if available for consistency
([#2110](#2110))
([7507822](7507822))
* implement link identity with oidc / native sign in
([#2108](#2108))
([5f0ec87](5f0ec87))
* implements email-less accounts with oauth
([#2105](#2105))
([9a61dae](9a61dae))
* introduce request-scoped background tasks & async mail sending
([#2126](#2126))
([2c8ea61](2c8ea61))
* refactor mailer client wiring and add validation wrapper
([#2130](#2130))
([68c40a6](68c40a6))
* support multiple `aud` for the external providers
([#2117](#2117))
([ca5792e](ca5792e))
* use `slices.Contains` instead of for loops
([#2111](#2111))
([9f22682](9f22682))


### Bug Fixes

* add `id-token` permission to ci
([#2143](#2143))
([79209c0](79209c0))
* add missing param
([#2125](#2125))
([c0b75f6](c0b75f6))
* change s3 artifact upload role
([#2145](#2145))
([767e371](767e371))
* remove requirement of empty content-type on 204
([#2128](#2128))
([ecc97e0](ecc97e0))
* run release-please again
([#2144](#2144))
([2560f14](2560f14))
* stripped binary now includes version
([#2147](#2147))
([609f169](609f169))
* update copyright year in LICENSE
([#2142](#2142))
([67fe0b0](67fe0b0))

---
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: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
mandarini pushed a commit to supabase/supabase-js that referenced this pull request Oct 2, 2025
Adds `linkIdentity()` method which allows passing OIDC credentials. The
ID token will be linked to the currently signed in user.

See also:
- supabase/auth#2108
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.

3 participants