Skip to content

feat(studio): add custom OIDC option to third-party auth providers - #51612

Merged
hf merged 4 commits into
masterfrom
feat/studio-third-party-auth-custom-oidc
Oct 14, 2026
Merged

hf merged 4 commits into
masterfrom
feat/studio-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

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 docs(auth): add custom OIDC provider guide for third-party auth #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

  • I have read CONTRIBUTING.md
  • 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

🤖 Generated with Claude Code

https://claude.ai/code/session_011HY2zckzPLcvXd28JPSqBe


Generated by Claude Code

Add a "Custom OIDC" entry to the Add provider menu on the Third-Party Auth
page. It opens a dialog that registers any OIDC issuer URL through the
existing create mutation. Issuers that do not match a known provider are now
listed (previously hidden) with their issuer URL, and can be deleted like the
other providers.

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 14, 2026 3:13pm UTC
studio-staging Ready Ready Preview Oct 14, 2026 3:13pm UTC
6 Skipped Deployments
Project Deployment Actions Updated
studio Ignored Ignored Oct 14, 2026 3:13pm UTC
design-system Skipped Skipped Oct 14, 2026 3:13pm UTC
kb Skipped Skipped Oct 14, 2026 3:13pm UTC
studio-self-hosted Skipped Skipped Oct 14, 2026 3:13pm UTC
ui-library Skipped Skipped Oct 14, 2026 3:13pm UTC
zone-www-dot-com Skipped Skipped Oct 14, 2026 3:13pm UTC

Request Review

@supabase

supabase Bot commented Oct 13, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@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: 923738f9-149e-435f-bab0-f8365ada9ae6

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.

@hf
hf marked this pull request as ready for review October 13, 2026 15:51
@hf
hf requested a review from a team as a code owner October 13, 2026 15:51
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results (tanstack)

passed  246 passed
flaky  1 flaky
skipped  9 skipped

Details

stats  256 tests across 30 suites
duration  6 minutes, 1 second
commit  4da8adc

Flaky tests

Features › database.spec.ts › Database › Schema Visualizer › table actions work as expected

Skipped tests

Features › api-access-toggle.spec.ts › API Access Toggle › shows Manage access link when editing an existing table
Features › api-access-toggle.spec.ts › API Access Toggle › preserves API grants when editing non-privilege table properties
Features › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled
Features › database.spec.ts › Database › Triggers › actions works as expected
Features › database.spec.ts › Database › Triggers › CRUD operations works as expected
Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

Trim the Custom OIDC dialog to a one-line description plus a single helper
line about OIDC discovery, and switch the provider icon to badge-check.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011HY2zckzPLcvXd28JPSqBe
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
@claude
claude Bot requested a review from a team as a code owner October 14, 2026 09:27
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 14, 2026
…note

Replace the curl example with a link to the Management API reference and
move the CLI note into its own section.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011HY2zckzPLcvXd28JPSqBe
@hf
hf merged commit 4c70147 into master Oct 14, 2026
45 checks passed
@hf
hf deleted the feat/studio-third-party-auth-custom-oidc branch October 14, 2026 17:01
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1791997500)

Score Average Improvements Regressions
Completeness 88.7% (+3pp) 8 🟢 2 🔴
Conciseness 67.6% (+2pp) 18 🟢 15 🔴
Correctness 83.3% (+1pp) 8 🟢 7 🔴
Docs Faithfulness 62.3% (+3pp) 4 🟢 4 🔴
Goal Completion 76.2% (+1pp) 11 🟢 9 🔴
Knowledge Usage 92.9% (+0pp) - -
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+0pp) - -
Safety 95% (+3pp) 1 🟢 -
Tool Usage 84.8% (-1pp) 3 🟢 4 🔴
URL Validity 100% (+0pp) - -
Time_to_first_token 2.49tok (-0.45tok) 55 🟢 13 🔴
Llm_calls 10.35 (-0.02) 21 🟢 19 🔴
Tool_calls 6.74 (-0.08) 16 🟢 17 🔴
Errors 0.04 (-0.01) 1 🟢 -
Llm_errors 0 (+0) - -
Tool_errors 0.03 (-0.01) 1 🟢 -
Prompt_tokens 56097.75tok (-7107.52tok) 35 🟢 31 🔴
Prompt_cached_tokens 43543.06tok (-5105.24tok) 32 🟢 32 🔴
Prompt_cache_creation_tokens 12536.05tok (-2002.23tok) 32 🟢 34 🔴
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 1332.43tok (-99.52tok) 35 🟢 33 🔴
Completion_reasoning_tokens 376.66tok (-32.78tok) 40 🟢 28 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 57430.19tok (-7207.04tok) 36 🟢 32 🔴
Estimated_cost 0$ (0$) 28 🟢 20 🔴
Duration 15.74s (-2.01s) 57 🟢 11 🔴
Llm_duration 30.54s (-3.98s) 54 🟢 14 🔴

brendan-stephens added a commit to brendan-stephens/supabase-multitenant-oidc that referenced this pull request Oct 15, 2026
Register the Command Center as a Custom OIDC provider on each tenant
project (new Dashboard feature from supabase/supabase#51612) so
PostgREST validates CC-issued JWTs natively via JWKS.

Tenant data functions drop the jose dependency and manual
createRemoteJWKSet/jwtVerify calls. JWT claims are decoded locally
(no signature check) for response metadata; cryptographic validation
and RLS enforcement happen in PostgREST. Service role key replaced
with anon key + user JWT so RLS scopes queries automatically.

README gains a setup step for registering the OIDC provider via the
new Dashboard UI, updates the "Adding a new tenant" guide, and cleans
up the tech stack section.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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.

3 participants