Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ export const GLOBAL_MENU_ITEMS: GlobalMenuItems = [
icon: 'dev-cli',
href: '/guides/local-development' as `/${string}`,
level: 'local_development',
enabled: localDevelopmentEnabled,
},
{
label: 'Deployment',
Expand Down Expand Up @@ -2266,7 +2265,6 @@ export const ai: NavMenuConstant = {
export const local_development: NavMenuConstant = {
icon: 'dev-cli',
title: 'Local Dev / CLI',
enabled: localDevelopmentEnabled,
url: '/guides/local-development',
items: [
{ name: 'Overview', url: '/guides/local-development' },
Expand All @@ -2275,7 +2273,11 @@ export const local_development: NavMenuConstant = {
url: undefined,
items: [
{ name: 'Getting started', url: '/guides/local-development/cli/getting-started' },
{ name: 'Configuration', url: '/guides/local-development/cli/config' },
{
name: 'Configuration',
url: '/guides/local-development/cli/config',
enabled: localDevelopmentEnabled,
},
{ name: 'CLI commands', url: '/reference/cli' },
],
},
Expand All @@ -2299,16 +2301,19 @@ export const local_development: NavMenuConstant = {
{
name: 'Restoring downloaded backup',
url: '/guides/local-development/restoring-downloaded-backup' as `/${string}`,
enabled: localDevelopmentEnabled,
},
{
name: 'Customizing email templates',
url: '/guides/local-development/customizing-email-templates' as `/${string}`,
enabled: localDevelopmentEnabled,
},
],
},
{
name: 'Testing',
url: undefined,
enabled: localDevelopmentEnabled,
items: [
{ name: 'Getting started', url: '/guides/local-development/testing/overview' },
{
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/docs/ref/cli/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ hideTitle: true

### Additional links

- [Install the Supabase CLI](/docs/guides/cli)
- [Install the Supabase CLI](/docs/guides/local-development/cli/getting-started)
- [Source code](https://github.com/supabase/cli)
- [Known bugs and issues](https://github.com/supabase/cli/issues)
- [Supabase CLI v1 and Management API Beta](https://supabase.com/blog/supabase-cli-v1-and-admin-api-beta)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ export const MfaAuthSettingsForm = () => {
<Form_Shadcn_ {...totpForm}>
<form onSubmit={totpForm.handleSubmit(onSubmitTotpForm)} className="space-y-4">
<Card>
<CardContent className="pt-6">
<CardContent>
<FormField_Shadcn_
control={totpForm.control}
name="MFA_TOTP"
Expand Down Expand Up @@ -410,10 +410,9 @@ export const MfaAuthSettingsForm = () => {
e.preventDefault()
maybeConfirmPhoneMFAOrSubmit()
}}
className="space-y-4"
>
<Card>
<CardContent className="pt-6">
<CardContent>
<FormField_Shadcn_
control={phoneForm.control}
name="MFA_PHONE"
Expand Down Expand Up @@ -565,9 +564,9 @@ export const MfaAuthSettingsForm = () => {
</PageSectionMeta>
<PageSectionContent>
<Form_Shadcn_ {...securityForm}>
<form onSubmit={securityForm.handleSubmit(onSubmitSecurityForm)} className="space-y-4">
<form onSubmit={securityForm.handleSubmit(onSubmitSecurityForm)}>
<Card>
<CardContent className="pt-6">
<CardContent>
<FormField_Shadcn_
control={securityForm.control}
name="MFA_ALLOW_LOW_AAL"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ export const OAuthServerSettingsForm = () => {
return (
<>
<Form_Shadcn_ {...form}>
<form onSubmit={form.handleSubmit(onSubmit)} className="pb-10">
<form onSubmit={form.handleSubmit(onSubmit)}>
<Card>
<CardContent className="flex flex-col py-6 gap-y-4">
<CardContent>
<FormField_Shadcn_
control={form.control}
name="OAUTH_SERVER_ENABLED"
Expand Down Expand Up @@ -220,9 +220,10 @@ export const OAuthServerSettingsForm = () => {
{/* Site URL and Authorization Path - Only show when OAuth Server is enabled */}
{form.watch('OAUTH_SERVER_ENABLED') && (
<>
<CardContent className="flex flex-col py-6 gap-y-4">
<CardContent>
<FormItemLayout
label="Site URL"
layout="flex-row-reverse"
description={
<>
The base URL of your application, configured in{' '}
Expand All @@ -243,13 +244,15 @@ export const OAuthServerSettingsForm = () => {
placeholder="https://example.com"
/>
</FormItemLayout>

</CardContent>
<CardContent className="space-y-4">
<FormField_Shadcn_
control={form.control}
name="OAUTH_SERVER_AUTHORIZATION_PATH"
render={({ field }) => (
<FormItemLayout
label="Authorization Path"
layout="flex-row-reverse"
description="Path where you'll implement the OAuth authorization UI (consent screens)."
>
<FormControl_Shadcn_>
Expand Down Expand Up @@ -281,7 +284,7 @@ export const OAuthServerSettingsForm = () => {
)
})()}
</CardContent>
<CardContent className="py-6">
<CardContent>
<FormField_Shadcn_
control={form.control}
name="OAUTH_SERVER_ALLOW_DYNAMIC_REGISTRATION"
Expand Down
110 changes: 59 additions & 51 deletions apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
FormField_Shadcn_,
Form_Shadcn_,
Input_Shadcn_,
PrePostTab,
Tooltip,
TooltipContent,
TooltipTrigger,
Expand Down Expand Up @@ -175,9 +176,9 @@ export const RateLimits = () => {
<PageSection>
<PageSectionContent>
<Form_Shadcn_ {...form}>
<form className="space-y-4" onSubmit={form.handleSubmit(onSubmit)}>
<form onSubmit={form.handleSubmit(onSubmit)}>
<Card>
<CardContent className="pt-6">
<CardContent>
<FormField_Shadcn_
control={form.control}
name="RATE_LIMIT_EMAIL_SENT"
Expand All @@ -190,13 +191,14 @@ export const RateLimits = () => {
<Tooltip>
<TooltipTrigger asChild>
<FormControl_Shadcn_>
<Input_Shadcn_
type="number"
className="w-24"
min={0}
{...field}
disabled={!canUpdateConfig || !canUpdateEmailLimit}
/>
<PrePostTab postTab="emails/h">
<Input_Shadcn_
type="number"
min={0}
{...field}
disabled={!canUpdateConfig || !canUpdateEmailLimit}
/>
</PrePostTab>
</FormControl_Shadcn_>
</TooltipTrigger>
{!canUpdateConfig || !canUpdateEmailLimit ? (
Expand Down Expand Up @@ -257,13 +259,14 @@ export const RateLimits = () => {
<Tooltip>
<TooltipTrigger asChild>
<FormControl_Shadcn_>
<Input_Shadcn_
type="number"
className="w-24"
min={0}
{...field}
disabled={!canUpdateConfig || !canUpdateSMSRateLimit}
/>
<PrePostTab postTab="sms/h">
<Input_Shadcn_
type="number"
min={0}
{...field}
disabled={!canUpdateConfig || !canUpdateSMSRateLimit}
/>
</PrePostTab>
</FormControl_Shadcn_>
</TooltipTrigger>
{!canUpdateConfig || !canUpdateSMSRateLimit ? (
Expand Down Expand Up @@ -302,13 +305,14 @@ export const RateLimits = () => {
<Tooltip>
<TooltipTrigger asChild>
<FormControl_Shadcn_>
<Input_Shadcn_
type="number"
className="w-24"
min={0}
{...field}
disabled={!canUpdateConfig}
/>
<PrePostTab postTab="requests/5 min">
<Input_Shadcn_
type="number"
min={0}
{...field}
disabled={!canUpdateConfig}
/>
</PrePostTab>
</FormControl_Shadcn_>
</TooltipTrigger>
{!canUpdateConfig && (
Expand Down Expand Up @@ -345,13 +349,14 @@ export const RateLimits = () => {
<Tooltip>
<TooltipTrigger asChild>
<FormControl_Shadcn_>
<Input_Shadcn_
type="number"
className="w-24"
min={0}
{...field}
disabled={!canUpdateConfig}
/>
<PrePostTab postTab="requests/5 min">
<Input_Shadcn_
type="number"
min={0}
{...field}
disabled={!canUpdateConfig}
/>
</PrePostTab>
</FormControl_Shadcn_>
</TooltipTrigger>
{!canUpdateConfig && (
Expand Down Expand Up @@ -388,13 +393,14 @@ export const RateLimits = () => {
<Tooltip>
<TooltipTrigger asChild>
<FormControl_Shadcn_>
<Input_Shadcn_
type="number"
className="w-24"
min={0}
{...field}
disabled={!canUpdateConfig || !canUpdateAnonymousUsersRateLimit}
/>
<PrePostTab postTab="requests/h">
<Input_Shadcn_
type="number"
min={0}
{...field}
disabled={!canUpdateConfig || !canUpdateAnonymousUsersRateLimit}
/>
</PrePostTab>
</FormControl_Shadcn_>
</TooltipTrigger>
{!canUpdateConfig || !canUpdateAnonymousUsersRateLimit ? (
Expand Down Expand Up @@ -431,13 +437,14 @@ export const RateLimits = () => {
<Tooltip>
<TooltipTrigger asChild>
<FormControl_Shadcn_>
<Input_Shadcn_
type="number"
className="w-24"
min={0}
{...field}
disabled={!canUpdateConfig}
/>
<PrePostTab postTab="requests/5 min">
<Input_Shadcn_
type="number"
min={0}
{...field}
disabled={!canUpdateConfig}
/>
</PrePostTab>
</FormControl_Shadcn_>
</TooltipTrigger>
{!canUpdateConfig && (
Expand Down Expand Up @@ -474,13 +481,14 @@ export const RateLimits = () => {
<Tooltip>
<TooltipTrigger asChild>
<FormControl_Shadcn_>
<Input_Shadcn_
type="number"
className="w-24"
min={0}
{...field}
disabled={!canUpdateConfig || !canUpdateWeb3RateLimit}
/>
<PrePostTab postTab="requests/5 min">
<Input_Shadcn_
type="number"
min={0}
{...field}
disabled={!canUpdateConfig || !canUpdateWeb3RateLimit}
/>
</PrePostTab>
</FormControl_Shadcn_>
</TooltipTrigger>
{!canUpdateConfig || !canUpdateWeb3RateLimit ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export const SessionsAuthSettingsForm = () => {
className="space-y-4"
>
<Card>
<CardContent className="pt-6">
<CardContent>
<FormField_Shadcn_
control={refreshTokenForm.control}
name="REFRESH_TOKEN_ROTATION_ENABLED"
Expand Down Expand Up @@ -238,7 +238,7 @@ export const SessionsAuthSettingsForm = () => {
label="Refresh token reuse interval"
description="Time interval where the same refresh token can be used multiple times to request for an access token. Recommendation: 10 seconds."
>
<FormControl_Shadcn_>
<FormControl_Shadcn_ className="w-full">
<PrePostTab postTab="seconds">
<Input_Shadcn_
type="number"
Expand Down Expand Up @@ -322,18 +322,16 @@ export const SessionsAuthSettingsForm = () => {
label="Time-box user sessions"
description="The amount of time before a user is forced to sign in again. Use 0 for never."
>
<div className="flex items-center">
<FormControl_Shadcn_>
<PrePostTab postTab={<HoursOrNeverText value={field.value || 0} />}>
<Input_Shadcn_
type="number"
min={0}
{...field}
disabled={!canUpdateConfig || !isProPlanAndUp}
/>
</PrePostTab>
</FormControl_Shadcn_>
</div>
<FormControl_Shadcn_ className="w-full">
<PrePostTab postTab={<HoursOrNeverText value={field.value || 0} />}>
<Input_Shadcn_
type="number"
min={0}
{...field}
disabled={!canUpdateConfig || !isProPlanAndUp}
/>
</PrePostTab>
</FormControl_Shadcn_>
</FormItemLayout>
)}
/>
Expand All @@ -349,17 +347,16 @@ export const SessionsAuthSettingsForm = () => {
label="Inactivity timeout"
description="The amount of time a user needs to be inactive to be forced to sign in again. Use 0 for never."
>
<div className="flex items-center">
<FormControl_Shadcn_>
<PrePostTab postTab={<HoursOrNeverText value={field.value || 0} />}>
<Input_Shadcn_
type="number"
{...field}
disabled={!canUpdateConfig || !isProPlanAndUp}
/>
</PrePostTab>
</FormControl_Shadcn_>
</div>
<FormControl_Shadcn_ className="w-full">
<PrePostTab postTab={<HoursOrNeverText value={field.value || 0} />}>
<Input_Shadcn_
type="number"
{...field}
className="flex-1"
disabled={!canUpdateConfig || !isProPlanAndUp}
/>
</PrePostTab>
</FormControl_Shadcn_>
</FormItemLayout>
)}
/>
Expand Down
Loading
Loading