Commit Graph

17 Commits

Author SHA1 Message Date
Gildas Garcia
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
Ivan Vasilov
714f0ad8e9 fix: Don't use the custom domain when resolving OpenID config (#46637)
When setting up an OAuth Server app, the Studio fetches OpenID config
from the URL. If the project uses custom domain, it'll cause a CORS
because the custom domain is not whitelisted. This PR changes to use the
`<ref>.supabase.co` URL to resolve the config.

How to test:

1. Have a project with custom domain
2. Open `/project/_/auth/oauth-server`
3. Enable the Supabase OAuth Server
4. The OAuth endpoints in the bottom should appear

BEFORE:
<img width="1172" height="412" alt="Screenshot 2026-06-04 at 10 43 35"
src="https://github.com/user-attachments/assets/d6157281-dc80-4a55-9356-10efb7953b7c"
/>

AFTER:
<img width="1182" height="406" alt="Screenshot 2026-06-04 at 10 42 20"
src="https://github.com/user-attachments/assets/6222124e-5f9e-4898-9fae-41d295211403"
/>

Fixes
https://linear.app/supabase/issue/FE-2987/oauth-endpoint-fields-are-empty-with-custom-domains
2026-06-04 11:17:14 +02:00
Gildas Garcia
0713a1efc1 chore: remove shadcn suffix for Input, Textarea, Alert and Collapsible (#45867)
## Problem

Now that we migrated old components to their new shadcn alternatives, we
don't need the `_Shadcn_` suffix anymore.

## Solution

Remove it

<img width="659" height="609" alt="image"
src="https://github.com/user-attachments/assets/2d7271a9-066a-4dcc-92fe-729b106d2c2f"
/>
2026-05-15 14:55:37 +02:00
Gildas Garcia
0facd341a6 chore: remove UI form components _Shadcn_ suffix (#45212)
## Problem

We used to have a `_Shadcn_` suffix for all the shadcn form components
because we also had `formik` form components.
This is not needed anymore.

## Solution

- Remove the suffix
- Update all usages
2026-04-24 12:14:15 +02:00
Francesco Sansalvadore
82f798f75a chore(studio): show oauth server endpoints in oauth server settings (#41783)
Show OAuth server endpoints in oauth server settings page.

Preview: [OAuth Server
settings](https://studio-staging-git-chore-show-oauth-server-endpoints-supabase.vercel.app/dashboard/project/_/auth/oauth-server)

<img width="1138" height="496" alt="Screenshot 2026-01-09 at 12 00 31"
src="https://github.com/user-attachments/assets/eeca7726-0426-4abe-990d-271b702e4f7b"
/>

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

* **New Features**
* Added an OAuth endpoints table showing Authorization, Token, JWKS, and
Discovery/OpenID URLs with copy-to-clipboard and a masked preview mode.
* Inline preview of the Authorization URL when an authorization path is
set.

* **Improvements**
* Reorganized OAuth server settings for clearer enable/disable flow,
conditional field visibility, and disable confirmation.
* Dynamic loading of the endpoints table, improved loading skeletons,
layout refinements, and form reset to reflect saved defaults.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Ali Waseem <waseema393@gmail.com>
2026-04-09 16:01:26 +02:00
Charis
4a0bb36ca8 style: require sorted imports in studio/components (#44408)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-04-01 10:22:37 +02:00
Joshen Lim
2e7b968b1c Fix Auth OAuth apps request error if oauth server has not been configured (#41870)
* Fix Auth OAuth apps request error if oauth server has not been configured

* Clean up
2026-01-14 09:31:03 +07:00
Ivan Vasilov
cc47bcfa6d chore: Migrate studio to use ui-patterns/shimmeringLoader (#41405)
* Add shimmering-loader CSS to ui-patterns.

* Import the shimmering-loader classes from the ui-patterns component.

* Remove ShimmeringLoader from studio.

* Migrate studio to use ui-patterns/ShimmeringLoader.

* Migrate away from using default import for ShimmeringLoader.

* Fix the css imports in docs and studio.
2025-12-17 14:54:07 +01:00
Francesco Sansalvadore
3b7a7e4455 chore(studio): auth settings form patterns (#41303)
* chore(studio): oauth server form styling

* chore(studio): auth sessions form pattern

* chore(studio): auth rate-limits form pattern

* chore(studio): auth mfa form styling

* chore(studio): preposttab lowercase

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-12-15 09:26:23 +01:00
Ivan Vasilov
0d5be306ef chore: Bump React Query to v5 (#40174)
* Bump the deps, refactor deprecated code.

* Migrate keepPreviousData usage.

* Migrate all uses of InfiniteQuery.

* Fix refetchInterval in queries.

* Migrate all use of isLoading to isPending in mutations.

* Fix accessing location in claim-project.

* Fix a bug in duplicate query keys.

* Migrate all queries to use isPending.

* Revert "Fix accessing location in claim-project."

This reverts commit 2a07df64b5.

* Revert the rss.xml file to master.
2025-12-10 10:10:29 +01:00
Saxon Fletcher
3d7d192ff6 Auth pages new page components (#40669)
* pages first

* fixes

* fix
2025-11-28 13:55:51 +10:00
Danny White
46ac132051 chore(studio): empty state improvements (#40807)
* migrations

* clearer value prop

* consistent verb

* migration input

* triggers

* extract trigger buttons

* database backups

* schema title

* unrelated nit

* fix

* shared component

* ui-patterns

* rename

* improve docs

* remove redundant overrides

* remove old file

* prettier fix

* fix type error

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-11-27 17:26:20 +08:00
Ivan Vasilov
d33fdcb4f2 fix: Refactor the temp API keys creation for oAuth Server apps (#40849)
* Remove the query for temp keys. Remove the query for supabase client. Add a function which creates a supabase client with a temp key.

* Add a new query for building the endpoint URL.

* Migrate all oAuth queries and mutations to use the new function for creating a Supabase project client.

* Use the new queries/mutations in the code.

* Use query in refetchInterval for useProjectSettings.

* Replace all uses in StorageExplorer with createProjectSupabaseClient.
2025-11-26 15:15:51 -07:00
Cemal Kılıç
39cb6c5f19 feat(oauthserver): update docs link and wording (#40833)
* feat(oauthserver): update docs link and wording

* fix: format
2025-11-26 21:32:06 +07:00
Ivan Vasilov
43cc61818c chore: Migrate all isPending uses in react-query (#40642)
* Bump react-query. Minor type and logic fixes.

* Migrate all use of isLoading to isPending in mutations.

* Fix type errors.
2025-11-20 16:44:53 +01:00
Cemal Kılıç
d5dc5431c0 chore(oauthserver): update UI texts (#40511)
* chore(oauthserver): update UI texts

* fix: update docs urls

---------

Co-authored-by: Ali Waseem <waseema393@gmail.com>
2025-11-19 08:29:41 -07:00
Francesco Sansalvadore
bc22be3855 feat: OAuth 2.1 - OAuth apps (#39165)
* oAuth clients index layout

* oAuth apps crud

* is public

* add user count and client secret generation and management

* scaffold oauth server settings

* improve oauth server enablement / disablement

* show cover when oAuth server is disabled

* fix update panel update button

* add site url and authorization path settings values

* move oauth server to it's own nav item

* remove unneeded oauth server settings

* let the user disactivate oauth server even after creating oauth apps

* better delete button

* cleanup

* fix typecheck

* test endpoints

* add EnableOAuth21 feature flag

* update OAUTH_SERVER_ auth config api

* load OAUTH_SERVER_ENABLED in oauth list

* Update the api.d.ts. Remove the custom versions of supa libs.

* Add query for getTemporaryAPIKey.

* Add a hook for initializing a supabase client.

* Add hooks for oAuth Server apps.

* Regenerate pnpm-lock.yaml.

* Revert updates to the platform.d.ts. Not needed for this PR.

* Migrate all code to use the new hooks.

* Try to integrate the mutations and fix some of the sheet and dialogs.

* improve default and saving states

* fix oauth app form validation

* unify components into CreateOrUpdateOAuthAppModal

* create or update oauth app

* Update the OAuth Server page.

* Remove extra files.

* Minor various fixes.

* More fixes to the creation of oauth apps.

* Bump the libs to fix a DELETE oauth app error.

* Clean up the scope feature.

* Move the feature flag in the auth layout.

* Bunch of smaller fixes.

* Regenerate pnpm-lock.

* Revert SidePanel and CardDescription changes.

* Add confirm dialog for regenerating secret.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-10-30 17:07:07 +00:00