Skip to content

docs(auth): add custom OIDC provider guide for third-party auth - #51611

Draft
claude[bot] wants to merge 1 commit into
masterfrom
docs/third-party-auth-custom-oidc
Draft

claude[bot] wants to merge 1 commit into
masterfrom
docs/third-party-auth-custom-oidc

Conversation

@claude

@claude claude Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Requested by Stojan Dimitrovski · Slack thread

Problem

Third-party auth accepts any OIDC issuer through the Management API (POST /v1/projects/{ref}/config/auth/third-party-auth takes oidc_issuer_url, jwks_url and custom_jwks). The docs only cover Clerk, Firebase Auth, Auth0, AWS Cognito and WorkOS, so there is no page for other OIDC providers. A customer asked whether a generic OIDC option exists and could not find one.

Solution

Add a "Custom OIDC provider" page under Third-party auth, link it from the overview and add it to the sidebar. The page covers:

  • Requirements: OIDC discovery, asymmetric signing with a kid header, and the role claim.
  • Registering an issuer with the Management API, with links to the list and delete endpoints.
  • RLS: auth.uid() casts sub to uuid, so providers with non-UUID subjects need auth.jwt()->>'sub'. Multi-issuer setups should add a restrictive policy on iss.
  • A note that there is no Dashboard option and no config.toml key for a custom issuer today. Studio's Add provider menu lists only the five supported providers, and the CLI [auth.third_party.*] config has no generic key.

Not covered because it could not be verified from the repo: plan limits for custom issuers, and whether signing algorithms beyond the ones listed on the existing provider pages are supported.

Review instructions

  1. Open /docs/guides/auth/third-party/custom-oidc in the preview and check the page renders and the sidebar entry appears under Third-party auth.
  2. Check the three API reference links resolve (v1-create-project-tpa-integration, v1-list-project-tpa-integrations, v1-delete-project-tpa-integration).
  3. Confirm the claims about plan limits, algorithms and jwks_url / custom_jwks behavior with the Auth team.

🤖 Generated with Claude Code

https://claude.ai/code/session_011HY2zckzPLcvXd28JPSqBe


Generated by Claude Code

Document how to register any OIDC issuer through the Management API,
including the role claim requirement, RLS with non-UUID subjects, and
the lack of Dashboard and config.toml support.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011HY2zckzPLcvXd28JPSqBe
@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview, v0 Oct 13, 2026 3:41pm UTC
7 Skipped Deployments
Project Deployment Actions Updated
studio Ignored Ignored Oct 13, 2026 3:41pm UTC
design-system Skipped Skipped Oct 13, 2026 3:41pm UTC
kb Skipped Skipped Oct 13, 2026 3:41pm UTC
studio-self-hosted Skipped Skipped Oct 13, 2026 3:41pm UTC
studio-staging Skipped Skipped Oct 13, 2026 3:41pm UTC
ui-library Skipped Skipped Oct 13, 2026 3:41pm UTC
zone-www-dot-com Skipped Skipped v0 Oct 13, 2026 3:41pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: supabase/supabase/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b2ffe58a-29a9-4108-8cc6-5a4f88940f25

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 13, 2026
claude Bot pushed a commit that referenced this pull request Oct 14, 2026
Documents the Dashboard flow (Authentication > Sign In / Providers >
Third-Party Auth > Add provider > Custom OIDC) and the Management API
alternative, following the structure of the Firebase Auth guide. Links
the page from the third-party auth overview and adds a sidebar entry.

Supersedes the draft docs PR #51611.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011HY2zckzPLcvXd28JPSqBe
hf pushed a commit that referenced this pull request Oct 14, 2026
…51612)

<!-- claude-slack-attribution -->
_Requested by **Stojan Dimitrovski** · [Slack
thread](https://supabase.slack.com/archives/C022071RB2L/p1791475016175969?thread_ts=1791475016.175969&cid=C022071RB2L)_

## Problem

The Management API accepts any OIDC issuer for third-party auth (`POST
/v1/projects/{ref}/config/auth/third-party-auth` with
`oidc_issuer_url`), but the Dashboard only offers Firebase, Clerk,
WorkOS, Auth0 and Amazon Cognito. Users with another OIDC provider have
no way to register it from the Dashboard.

Studio also hides any issuer it does not recognize: `IntegrationCard`
returns `null` for the `custom` type, so an issuer added through the API
never shows up in the list and cannot be deleted from the Dashboard.

## Solution

- Add a "Custom OIDC" item to the Add provider menu on the Third-Party
Auth page.
- New `CreateCustomOidcDialog` with a single required Issuer URL field.
It reuses `useCreateThirdPartyAuthIntegrationMutation`, so query
invalidation and the error toast behave like the other providers. The
URL is sent as typed after trimming whitespace.
- New `isValidOidcIssuerUrl` helper in `ThirdPartyAuthForm.utils.ts`:
the value must be an `https://` URL with a host, no query string, no
fragment, and no embedded credentials.
- The dialog copy is kept short: a one-line description and a single
helper line noting that signing keys are found at the issuer's
`/.well-known/openid-configuration`.
- `IntegrationCard` now renders custom issuers (badge-check icon,
"Custom OIDC" label, Issuer URL, Delete integration) instead of hiding
them. Delete uses the existing flow and permission check.
- The `custom` label changes from "Custom" to "Custom OIDC".
- New docs page
`apps/docs/content/guides/auth/third-party/custom-oidc.mdx` (served at
`/docs/guides/auth/third-party/custom-oidc`). It covers the Dashboard
flow, the Management API alternative, the `role` claim, client setup,
and RLS. It is linked from the third-party auth overview and added to
the docs sidebar. This supersedes the draft docs PR #51611.

Not included: UI for `jwks_url` and `custom_jwks`. The page and menu
keep the same feature gate (`authentication:third_party_auth`) and the
same permission checks as the other providers.

Before: the Add provider menu lists five providers. An issuer that is
not one of them is registered only through the API and does not appear
in the Dashboard.

After: the menu has a sixth item, Custom OIDC. It opens a dialog that
takes an issuer URL, rejects non-HTTPS values with an inline message,
and registers the issuer. The new provider appears in the list and can
be deleted from there.

## Review instructions

1. Open a project's Authentication > Third-Party Auth page and open Add
provider. Check for the new Custom OIDC item.
2. Enter `http://example.com` and submit. The field shows an inline
error and no request is sent.
3. Enter a valid HTTPS issuer URL that serves an OIDC discovery document
and submit. A success toast appears and the provider shows in the list
as Custom OIDC with its Issuer URL.
4. Enter an issuer the API rejects. The API error shows in the existing
error toast and the dialog stays open.
5. Delete the provider with Delete integration and confirm it disappears
from the list.
6. Read the new docs page and check that its Dashboard steps match the
UI.

Local checks:

- `vitest --run components/interfaces/Auth/ThirdPartyAuthForm`: 20 tests
pass (validation helper unit tests plus dialog component tests with
MSW).
- `tsc --noEmit` in `apps/studio`: no new errors.
- ESLint on the directory: no warnings in the new or changed code.
- Prettier is clean on the changed files, including the docs page. The
typos check is clean on the docs page and overview.

I did not run the dialog in a browser against a real project, so there
are no screenshots. The docs app was not built or rendered locally.

## Checklist

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)

🤖 Generated with [Claude
Code](https://claude.ai/code/session_011HY2zckzPLcvXd28JPSqBe)

https://claude.ai/code/session_011HY2zckzPLcvXd28JPSqBe


---
_Generated by [Claude
Code](https://claude.ai/code/session_011HY2zckzPLcvXd28JPSqBe)_

---------

Co-authored-by: Claude <[email protected]>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant