Files
supabase/apps/studio/components/interfaces/JwtSecrets/start-using-keys-banner.tsx
Stojan DimitrovskiandIvan Vasilov 4945ba1861 feat: add asymmetric JWT UI (#36519)
* original files from previous PR

* get rid of router in jwt-secrets to make it show up

* rename jwt-secrets page to jwt-signing-keys

* add jwt-signing-keys query

* add legacy jwt signing keys query

* wire-up JwtSecretKeysTable with queries

* add jwt signing keys page to settings menu

* deduplicate labels, descriptions, etc

* add create, update jwt-signing-key mutations

* update types

* remove unused components, to be refactored later

* make everything into a mostly working state

* legacy migration added

* put jwt keys page like api keys

* fully migrate legacy jwt secret page

* fix prettier

* fix typecheck ts-expect-error

* rm unneeded file

* Fix compile errors.

* Rename the files and move them to the same folder.

* Merge the two constant files.

* Fix the imports.

* Fix a bug in the API keys page when opening it in a new tab.

* Change the page to be at /signing-keys

* Fix some minor types.

* Break apart some of the components in the signing keys UI.

* Use a feature banner for the initial action.

* Make a create key dialog and move functionality there.

* Fix some cosmetic issues.

* Minor cosmetic fixes.

* Remove extra keys in RQ cache.

* Add a missing link

* Add a banner when the feature flag is false.

* Minor type fix.

* more tiny type fix

* fix error on create standby key

* add alert to prevent revoking legacy jwt secret without disabling legacy api keys first

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2025-06-23 09:36:07 +12:00

29 lines
925 B
TypeScript

import { FeatureBanner } from 'components/ui/FeatureBanner'
import { Import } from 'lucide-react'
import { Button } from 'ui'
export const StartUsingJwtSigningKeysBanner = ({
onClick,
isLoading,
}: {
onClick: () => void
isLoading: boolean
}) => {
return (
<FeatureBanner bgAlt>
<div className="flex flex-col gap-0 z-[2]">
<p className="text-sm text-foreground">Start using JWT signing keys</p>
<p className="text-sm text-foreground-lighter lg:max-w-sm 2xl:max-w-none">
Right now your project is using the legacy JWT secret. To start taking advantage of the
new JWT signing keys, migrate your project's secret to the new set up.
</p>
<div className="mt-4">
<Button type="primary" icon={<Import />} onClick={onClick} loading={isLoading}>
Migrate JWT secret
</Button>
</div>
</div>
</FeatureBanner>
)
}