Commit Graph

22 Commits

Author SHA1 Message Date
Joshen Lim
27188c147c Support creating multiple publishable keys, and deleting publishable keys (#41186)
* Support creating multiple publishable keys, and deleting publishable keys

* FIx types

* Smol

* Smol fix

* Address issues

* Update comment

* Replace all usage of useApiKeysVisiblity for checking permissions to just call useAsyncCheckPermissions directly

* Clean up and deprecate useApiKeysVisibility hook

* ADdress
2025-12-12 16:07:36 +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
Ivan Vasilov
8ce41157a3 fix: Generate temp API keys when doing mutations for Analytics buckets (#40680)
* Refactor the iceberg queries and mutations to use getOrRefreshTemporaryApiKey.

* Fix the uses of the mutations.

* Hardcode the temp api keys queries at 60 seconds.
2025-11-21 21:47:29 +08:00
Ali Waseem
88c5e7cbd4 Fix: updated expiry to be 60 seconds (#40659)
* updated expiry to be 60 seconds

* updated tests

* Updated API
2025-11-20 14:00:11 -07:00
Ali Waseem
3f6f8aa906 Fix: Use storage API for downloading files in the Dashboard (#40592)
* added ability to download files from storage api directly

* updated to rechange size

* updated test methods

* updated test suite

* updated tests

* updated to remove loops

* removed AI slop

* Updated to use single API key in mem

* Fix the memoization of the getOrRefreshTempApiKey function.

* updated imports

* updated imports

* updated to use import meta

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-11-19 11:56:04 -07:00
Ali Waseem
d9e5851467 Fix: storage throttle issues when uploading large number of files (#40445)
* WIP: storage key throttling

* updated usage

* added api key validation tets

* removed comments

* updated description
2025-11-14 07:32:01 -07:00
Ivan Vasilov
8b657165b5 chore: Migrate to use custom type for ReactQuery queries and mutations (#40073)
* Add custom types for queries, mutations and infinite queries.

* Migrate all queries to use the new type.

* Migrate all infinite queries to useCustomInfiniteQueryOptions.

* Migrate all mutations to use useCustomMutationOptions.

* Add type to all imports in `types` folder.
2025-11-03 13:18:13 +01:00
Joshen Lim
64e3e047eb Final final cleaning up barrel files (#40018)
* Final final cleaning up barrel files

* Fix merge conflict
2025-10-31 14:02:59 +08: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
Ivan Vasilov
da4a40e308 chore: Migrate RQ functions to use object syntax style (#39895)
* Migrate all uses of invalidateQueries to use object syntax.

* Migrate the remainder of useInfiniteQuery.

* Migrate all setQueriesData.

* Migrate all fetchQuery uses.

* Migrate some leftover functions from RQ.

* Fix issues found by Charis.
2025-10-28 10:43:14 +01:00
Alaister Young
8855d05803 chore(studio): swap react-query to object syntax (#39842)
* chore(studio): swap react-query to object syntax

* Fix small issues found

* Fix realtime settings

* Nit

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-27 09:38:27 +01:00
Joshen Lim
7a35ad3081 Bump temp API key expiry to an hour just for realtime inspector (#37896)
* Bump temp API key expiry to an hour just for realtime inspector

* Refresh temp api token whenever starting a refresh listen session in realtime inspector if current token in realtime config is a temp key
2025-08-14 15:24:30 +07:00
Stojan Dimitrovski
7e367daf73 feat: use temporary api keys for storage explorer (#37696)
* feat: use temporary api keys for storage explorer

* Remove service key from storage explorer store + some minor UI nits

* Address TS

* Another TS

* Update

* Use temp API keys in realtime inspector (#37740)

* Use temp API keys in realtime inspector

* Fix

* fix: typo from github web ui…

* fix: opps

* fix: missing import

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
Co-authored-by: Cemal Kılıç <cemalkilic@users.noreply.github.com>
Co-authored-by: Cemal Kilic <cemalkilic96@gmail.com>
2025-08-12 11:40:45 +02:00
Terry Sutton
32b5d8c244 feat: enable Self-Service Single Sign-On (SSO) for orgs (#36732)
* Start

* Add join org logic

* Regenerate the API types and add RQ hooks.

* Various fixes to the UI for SSO config.

* Refactor the components to use RHF.

* Fix the loading/error states in the main file.

* fix: minor changes to SSO UI

* Expanded default attribute mapping preset for `Okta` to include `user_name`, `first_name`, and `last_name` to match our docs.
* Normalized role casing in the "Join Organization on Signup" dropdown to match the roles expected by the backend (`Owner`, `Administrator`, `Developer`).
* Added the role (`Read-only`) to the selectable roles for auto-join.
* Call update mutation when an `ssoConfig` has been retrieved.
* Treats `404` as a valid "create" flow state rather than an error.
* Conditionally renders the SSO config form when config is successfully loaded *or* when the provider is not found, allowing users to onboard from scratch and disable the provider.

* chore: prettier

* feat: add a button linking to SSO setup docs

* Revert "feat: add a button linking to SSO setup docs"

This will be included in a separate docs pr.

This reverts commit 0b616fdd2e.

* General clean up

* Nit copy

* Add empty state for SSO

* Smol change

* One last tweak

---------

Co-authored-by: Chris Stockton <180184+cstockton@users.noreply.github.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Chris Stockton <chris.stockton@supabase.io>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-08-05 17:03:30 -07:00
Stojan Dimitrovski
800d688d4c fix: api key mutations invalidate proper keys (#37467)
* fix: api key mutations invalidate proper keys

* Fix the RQ keys for API keys.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-07-25 17:47:44 +02:00
Joshen Lim
31b8fbe487 Deprecate getAPIKeys from project settings v2, use new api keys endpoint instead (#37300)
* Deprecate getAPIKeys from project settings v2, use new api keys endpoint instead

* use getPreferredKeys where appropriate

* Prevent usage of secret key for storage and realtime inspector

* Add dashboard API api-keys endpoint

* Simplify

* Disable edge functions test if legacy api keys are disabled

* Revert

* Fix graphiql

* Remove all usage of api keys from project settings, except DisplayApiSettings

* Update

* Fix

* Small fix for an undefined upload url.

* Fix the storage state initialization when the resumable url changes.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-07-22 16:22:03 +08:00
Joshen Lim
b4717e1787 Some fixes for local studio (#37147) 2025-07-15 17:22:23 +08:00
Stojan Dimitrovski
7c3f79578e feat: allow disabling and re-enabling of anon and service_role (#36395)
* feat: allow disabling and re-enabling of `anon` and `service_role`

* Cleanup the RQ hooks.

* Restructure the enable/disable alert in API keys.

* Minor cleanups.

* Minor fixes.

* Fix a type error.

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-06-16 17:46:34 +02:00
Stojan Dimitrovski
515359c3bc fix: more api key ui fixes (#36300) 2025-06-10 16:36:34 +02:00
Jonathan Summers-Muir
9318404e61 Feat/api keys rollout prep (#35559)
* first pass

* init

* updated types

* fix up key reveal

* Update QuickKeyCopy.tsx

* remove quick key copy

* api key pill now only allows reveal and copy if you have perm

* Update LegacyAPIKeys.tsx

* fix up layouts

* fix copy

* Fix action menu dropdown position, few small nudges

* Remove unused files.

* Remove the hardcoded and rename the feature flag for basic API keys.

* add support for name and description, some smaller improvements

* Fix the trims for the description.

---------

Co-authored-by: Terry Sutton <saltcod@gmail.com>
Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
2025-05-27 15:50:42 +02:00
Joshen Lim
40ca927808 Chore/support updating email and unlinking identities (#33966)
* Support updating email address for email identity

* Support unlinking identity

* Deprecate AccountInformation component

* Invalidate identities after unlinking

* Address feedback

* Smol

* Fix type issues

* Update toast message

* Set up email change pending badge

* Fix

* Address feedback

* Resolve ts-expect-errors

* Fix TS issues + Fix GH icon on light mode + Address feedback
2025-03-21 17:15:05 +08:00
Jonathan Summers-Muir
4649bf911e feat: new api keys [hidden] (#33252)
* feat: add basic api keys ui

* init JWT secrets. rough

* Update JWTSecretKeysTable.tsx

* added some info hover cards.

• found this this is probably the wrong direction
• will create a new page for next iteration.

* init new version

* add illustrations

* Update JWTSecretKeysTablev2.tsx

* chore: delete API key now works

* some style changes

* added better tables

* Update JWTSecretKeysTablev2.tsx

* add public JWT dialog

* moar

* adding sub layout in

* starts adding in a ButtonGroup

* about to make into separate components

* added quick copy to project loading screen

* build state

* basic loading

* confirm dialog and loading states

* switched for better loading experience

* moved styles of Input to InputVariants

* issue with ref type

* loading,error and rest states

* new loading states

* alt l;ayout

* add group

* updated error states for permissions

* copy button behaviour for secret keys

* delete dialog

* Update QuickKeyCopy.tsx

* fix type errors

* Update JWTSecretKeysTablev2.tsx

* update menu to hide pages

* Update SettingsMenu.utils.tsx

* Update resource-query.ts

* remove old file

* moved JWT secrets to use valtio

* Update api-keys-query.ts

* fix typecheck

* rename files

* remove JWT stuff

* revert file

* remove more JWT stuff

* Update package.json

* Update pnpm-lock.yaml

* Update ProjectLayout.tsx

* Update PublishableAPIKeys.tsx

* Update api-keys-query.ts

* refactor api-keys-query

* Update SettingsMenu.utils.tsx

* Some clean up

* more clean up and refactor

* Update APIKeyRow.tsx

* Update LayoutHeader.tsx

* resolve comments

* Update CreateSecretAPIKeyModal.tsx

* Update APIKeyRow.tsx

* Add perms check for delete API keys

* Remove console log

* Delete ConnectDialog.tsx

* use project ref

---------

Co-authored-by: Stojan Dimitrovski <sdimitrovski@gmail.com>
Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-02-05 15:21:10 +01:00