Commit Graph
14 Commits
Author SHA1 Message Date
claude[bot]andClaude 4c7014745c feat(studio): add custom OIDC option to third-party auth providers (#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 <noreply@anthropic.com>
2026-10-14 19:01:08 +02:00
Joshen Lim 09a1f431bc Mass update for all lucide icon imports to use the component with Icon suffix (#51659)
## Context

This is largely just a mechanical change here:
Opting to use lucide icons with the `Icon` suffix across all icon
imports within `studio`
- so that it’s clearer which components are icons + reduces the
possibility of name collision with our own components
- e.g <User /> vs <UserIcon />

Also added a eslint rule for this:
<img width="1069" height="167" alt="image"
src="https://github.com/user-attachments/assets/7f36f443-5ca2-4bf6-8d22-86e774513bfc"
/>

And updated `AGENTS.md` as such:
```
Icons come from `lucide-react`, always imported with the `Icon` suffix (`import { CheckIcon, Trash2Icon } from 'lucide-react'`) — never the bare names (`Check`) or `Check as CheckIcon` aliases (lint-enforced).
```
2026-10-14 12:56:55 +02:00
Gildas GarciaandIvan Vasilov 96d43099bb chore: refactor Button API so that it can be used a standard button (#46880)
## Problem

Our `<Button>` component breaks the default `button` contract by
redefining the `type` prop to set its variant (`primary`, `default`,
etc) instead of the button type (`submit`, `button`, etc).
This is confusing and forces to write more code when using it with
shadcn components that expect/inject the standard button props.

## Solution

- rename the `type` prop to `variant`
- rename the `htmlType` prop to `type`
- propagate the changes where necessary
- format code

## How to test

As this is just prop renaming, if it builds it's ok

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-06-16 23:59:58 +02:00
Ali WaseemandDanny White 0278672102 feat(studio): add Auth sub-page navigation chords (#45696)
## Summary
- Adds contextual `A + <letter>` chord shortcuts for jumping between
Authentication sub-pages while `AuthLayout` is mounted, mirroring the
existing database-nav chord pattern.
- Wires the shared `LIST_PAGE_*` shortcuts (focus search, create new,
reset filters, schema selector) onto the Auth list pages so they behave
like the Database list pages.
- Fills in the previously-missing `A + U` chord for the **Users** page
so every entry in the Auth menu has a chord.

Resolves
[FE-3187](https://linear.app/supabase/issue/FE-3187/add-a-u-keyboard-shortcut-for-auth-users-page).

## Auth navigation chords

Active anywhere under `/project/<ref>/auth/*`. Press `A` then the listed
letter.

| Page | Chord |
| --- | --- |
| Overview | `A` `O` |
| Users | `A` `U` |
| OAuth Apps | `A` `A` |
| Email | `A` `E` |
| Policies | `A` `P` |
| Sign In / Providers | `A` `I` |
| Passkeys | `A` `K` |
| OAuth Server | `A` `V` |
| Sessions | `A` `S` |
| Rate Limits | `A` `R` |
| Multi-Factor | `A` `M` |
| URL Configuration | `A` `L` |
| Attack Protection | `A` `T` |
| Auth Hooks | `A` `H` |
| Audit Logs | `A` `G` |
| Performance | `A` `F` |

## Auth list-page shortcuts

Each Auth list page opts into the shared `LIST_PAGE_*` registry — same
chords as the Database list pages (`Shift+F`, `Shift+N`, `F` `C`, `O`
`S`). Coverage matches the controls each page actually exposes:

| List page | Search (`Shift+F`) | New (`Shift+N`) | Reset filters (`F`
`C`) | Schema selector (`O` `S`) |
| --- | :---: | :---: | :---: | :---: |
| Custom Auth Providers | ✓ | ✓ | ✓ | — |
| OAuth Apps | ✓ | ✓ | ✓ | — |
| Policies | ✓ | — | ✓ | ✓ |
| Auth Hooks | — | ✓ | — | — |
| Redirect URLs | — | ✓ | — | — |
| Third-Party Auth | — | ✓ | — | — |

## Test plan
- [x] While anywhere under `/project/<ref>/auth/*`, every chord in the
navigation table jumps to the corresponding page.
- [x] On each list page in the second table, the marked shortcuts focus
the search input / open the create flow / reset filters / open the
schema picker as expected.
- [x] Chords are not active outside of `/project/<ref>/auth/*` and do
not trigger while typing in inputs (where `ignoreInputs` applies).

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Global keyboard shortcuts for Auth pages: navigate auth sections,
focus/search inputs, reset filters, and open "Add" flows (providers,
OAuth apps, hooks, URLs, policies).
* "Add" controls in lists respond to shortcuts and show appropriate
disabled/tooltip states when unavailable.
* Product menu and shortcuts reference now include an "Auth Navigation"
section and per-item shortcut hints.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Danny White <3104761+dnywh@users.noreply.github.com>
2026-05-08 07:13:25 -06:00
Joshen Lim 564f4f66ee Joshen/fe 2660 clean up stale feature flags enabled for 2 months part 1 (#43329)
## Context 

Just cleaning up feature flags that have been toggled on for all users
and unchanged for the past 2 months
- advisorRules
- newJwtSecrets
- isWorkOSTPAEnabled
- EnableOAuth21
- gitlessBranching
- showRefreshToast
- awsPrivateLinkIntegration
- useBedrockAssistant (Already not used)
- enableStripeSyncEngineIntegration
- ShowExplainWithAiInQueryPerformance

Doing it in 2 parts so its easier for review
2026-03-04 13:08:39 +08:00
Danny WhiteandJoshen Lim 080cc7aeab chore(studio): authentication empty states (#40883)
* auth hooks and docs

* third-party auth

* remove unrelated changes

* remove unrelated changes

* docs tighten

* docs tighten

* Nit clean up

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-28 14:57:56 +08:00
Joshen Lim 4124f0ed98 Shift useFlag hook and configcat library to common package, remove from Studio (#38203)
* Shift useFlag hook and configcat library to common package, remove from studio

* Fix test

* Fix test
2025-08-27 13:42:20 +07:00
Stojan Dimitrovski 74a3be9aa8 feat: add workos tpa ui behind feature flag (#36254) 2025-06-09 19:56:06 +02:00
Joshen Lim a4d5af48c8 Downgrade and fix radix dialog version to 1.0.5, and remove unnecessary modal props from all usages of DropdownMenu (#35027)
* Downgrade and fix radix dialog version to 1.0.5, and remove unnecessary modal props from all usages of DropdownMenu

* Downgrade and fix radix dialog version to 1.0.5, and remove unnecessary modal props from all usages of DropdownMenu

* Fix PopoverPOrtal

* Fix
2025-04-15 17:29:32 +08:00
Stojan Dimitrovski 8b8a29ddf2 feat: clerk tpa fully available (#34402) 2025-03-28 17:23:31 +01:00
Stojan Dimitrovski 127dd8afc9 feat: add clerk as third-party auth provider / TP-MAU pricing (#33327)
- Adds Clerk as third-party auth provider, behind feature flags for future release
- Adjust pricing according to new pricing RFC
- Remove paid plan feature gatekeeping
2025-02-21 14:59:38 +08:00
Stojan DimitrovskiandIvan Vasilov 3122efc7b7 feat: make firebase tpa generally available (#32573)
* feat: make firebase tpa generally available

* Simplify the dropdown menu label.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-01-09 13:27:02 +01:00
Ivan VasilovandJoshen Lim b73317fc67 feat: Pricing for TPA (#28454)
* Don't set fixed height on the generateSecret button in hooks sheet.

* Block two of the TPA providers on free plan orgs.

* Fix some copy. Add more explanation about the pricing.

* Update copy

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-08-14 11:01:58 +02:00
Ivan Vasilov 9ac44f5985 feat: Add Third Party Auth settings (#27564)
* Add queries and mutations for third party auth.

* Show the ThirdPartyAuth form in the auth settings.

* Minor fixes to the mutations.

* Add a comment for TODO.

* Add all components for third party auth.

* Minor fixes.

* Update the firebase icons.

* Update the api-types.

* Fix the barrel file imports.

* Make the sheets more intuitive.

* Add a dialog for adding RLS policies for the firebase integration.

* Hide the 3rd party auth section behind a form.

* Fix a type error.

* Update the wording on the Add RLS policy dialog.

* Replace the sheets with dialogs.

* Add fixes for the comments on github.

* Minor fixes.

* Fix a type error.

* Make the delete integration awaitable.
2024-07-25 11:07:09 +02:00