From d75b7c37bb2ff1b7cf4ad537946a9aedf3729d20 Mon Sep 17 00:00:00 2001
From: Joshen Lim
Date: Fri, 25 Apr 2025 23:59:53 +0700
Subject: [PATCH] Update all links that were pointing to settings/auth to their
respective updated pages (#35281)
---
.../interfaces/Auth/RateLimits/RateLimits.tsx | 10 +++-------
.../components/interfaces/Linter/Linter.utils.tsx | 10 +++++-----
.../ProjectSettingsLayout/ProjectSettings.Commands.tsx | 2 +-
.../ResourceExhaustionWarningBanner.constants.ts | 2 +-
.../ResourceExhaustionWarningBanner.tsx | 4 ++--
5 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx b/apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx
index 6d484a4026f..7b72ddd9e2a 100644
--- a/apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx
+++ b/apps/studio/components/interfaces/Auth/RateLimits/RateLimits.tsx
@@ -7,6 +7,7 @@ import { toast } from 'sonner'
import * as z from 'zod'
import { useParams } from 'common'
+import { ScaffoldSection } from 'components/layouts/Scaffold'
import AlertError from 'components/ui/AlertError'
import NoPermission from 'components/ui/NoPermission'
import { GenericSkeletonLoader } from 'components/ui/ShimmeringLoader'
@@ -14,9 +15,6 @@ import { useAuthConfigQuery } from 'data/auth/auth-config-query'
import { useAuthConfigUpdateMutation } from 'data/auth/auth-config-update-mutation'
import { useCheckPermissions } from 'hooks/misc/useCheckPermissions'
import {
- AlertDescription_Shadcn_,
- AlertTitle_Shadcn_,
- Alert_Shadcn_,
Button,
Card,
CardContent,
@@ -25,14 +23,12 @@ import {
FormField_Shadcn_,
Form_Shadcn_,
Input_Shadcn_,
- WarningIcon,
Tooltip,
TooltipContent,
TooltipTrigger,
} from 'ui'
import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout'
import { isSmtpEnabled } from '../SmtpForm/SmtpForm.utils'
-import { ScaffoldSection } from 'components/layouts/Scaffold'
const RateLimits = () => {
const { ref: projectRef } = useParams()
@@ -199,7 +195,7 @@ const RateLimits = () => {
@@ -375,7 +371,7 @@ const RateLimits = () => {
Enable anonymous logins to update this rate limit
diff --git a/apps/studio/components/interfaces/Linter/Linter.utils.tsx b/apps/studio/components/interfaces/Linter/Linter.utils.tsx
index 872f90b3a85..234092e34fe 100644
--- a/apps/studio/components/interfaces/Linter/Linter.utils.tsx
+++ b/apps/studio/components/interfaces/Linter/Linter.utils.tsx
@@ -240,7 +240,7 @@ export const lintInfoMap: LintInfo[] = [
name: 'password_requirements_min_length',
title: 'Minimum password length not set or inadequate',
icon: ,
- link: ({ projectRef }) => `/project/${projectRef}/settings/auth`,
+ link: ({ projectRef }) => `/project/${projectRef}/auth/providers?provider=Email`,
linkText: 'View settings',
docsLink: 'https://supabase.com/docs/guides/platform/going-into-prod#security',
category: 'security',
@@ -258,7 +258,7 @@ export const lintInfoMap: LintInfo[] = [
name: 'auth_leaked_password_protection',
title: 'Leaked Password Protection Disabled',
icon: ,
- link: ({ projectRef }) => `/project/${projectRef}/settings/auth`,
+ link: ({ projectRef }) => `/project/${projectRef}/auth/providers?provider=Email`,
linkText: 'View settings',
docsLink:
'https://supabase.com/docs/guides/auth/password-security#password-strength-and-leaked-password-protection',
@@ -268,7 +268,7 @@ export const lintInfoMap: LintInfo[] = [
name: 'auth_insufficient_mfa_options',
title: 'Insufficient MFA Options',
icon: ,
- link: ({ projectRef }) => `/project/${projectRef}/settings/auth`,
+ link: ({ projectRef }) => `/project/${projectRef}/auth/mfa`,
linkText: 'View settings',
docsLink: 'https://supabase.com/docs/guides/auth/auth-mfa',
category: 'security',
@@ -277,7 +277,7 @@ export const lintInfoMap: LintInfo[] = [
name: 'auth_password_policy_missing',
title: 'Password Policy Missing',
icon: ,
- link: ({ projectRef }) => `/project/${projectRef}/settings/auth`,
+ link: ({ projectRef }) => `/project/${projectRef}/auth/providers?provider=Email`,
linkText: 'View settings',
docsLink: 'https://supabase.com/docs/guides/auth/password-security',
category: 'security',
@@ -295,7 +295,7 @@ export const lintInfoMap: LintInfo[] = [
name: 'no_backup_admin',
title: 'No Backup Admin Detected',
icon: ,
- link: ({ projectRef }) => `/project/${projectRef}/settings/auth`,
+ link: ({ projectRef }) => `/project/${projectRef}/auth/mfa`,
linkText: 'View settings',
docsLink: 'https://supabase.com/docs/guides/auth/auth-mfa',
category: 'security',
diff --git a/apps/studio/components/layouts/ProjectSettingsLayout/ProjectSettings.Commands.tsx b/apps/studio/components/layouts/ProjectSettingsLayout/ProjectSettings.Commands.tsx
index 20b432d04ad..cd9795b089a 100644
--- a/apps/studio/components/layouts/ProjectSettingsLayout/ProjectSettings.Commands.tsx
+++ b/apps/studio/components/layouts/ProjectSettingsLayout/ProjectSettings.Commands.tsx
@@ -25,7 +25,7 @@ export function useProjectSettingsGotoCommands(options?: CommandOptions) {
{
id: 'nav-project-settings-auth',
name: 'Auth Settings',
- route: `/project/${ref}/settings/auth`,
+ route: `/project/${ref}/auth/providers`,
defaultHidden: true,
},
{
diff --git a/apps/studio/components/ui/ResourceExhaustionWarningBanner/ResourceExhaustionWarningBanner.constants.ts b/apps/studio/components/ui/ResourceExhaustionWarningBanner/ResourceExhaustionWarningBanner.constants.ts
index 6333c7fae09..398a5160ac8 100644
--- a/apps/studio/components/ui/ResourceExhaustionWarningBanner/ResourceExhaustionWarningBanner.constants.ts
+++ b/apps/studio/components/ui/ResourceExhaustionWarningBanner/ResourceExhaustionWarningBanner.constants.ts
@@ -1,5 +1,5 @@
interface ResourceWarningMessage {
- // should match pathnames, ex: ('/', 'project/[ref]/auth', 'project/[ref]/database', '/project/[ref]/settings/auth')
+ // should match pathnames, ex: ('/', 'project/[ref]/auth', 'project/[ref]/database', '/project/[ref]/settings/api')
restrictToRoutes?: string[]
bannerContent: {
diff --git a/apps/studio/components/ui/ResourceExhaustionWarningBanner/ResourceExhaustionWarningBanner.tsx b/apps/studio/components/ui/ResourceExhaustionWarningBanner/ResourceExhaustionWarningBanner.tsx
index 583872abb20..60c1ce45da7 100644
--- a/apps/studio/components/ui/ResourceExhaustionWarningBanner/ResourceExhaustionWarningBanner.tsx
+++ b/apps/studio/components/ui/ResourceExhaustionWarningBanner/ResourceExhaustionWarningBanner.tsx
@@ -73,8 +73,8 @@ export const ResourceExhaustionWarningBanner = () => {
null: '/project/[ref]/settings/[infra-path]',
disk_space: '/project/[ref]/settings/compute-and-disk',
read_only: '/project/[ref]/settings/compute-and-disk',
- auth_email_rate_limit: '/project/[ref]/settings/auth',
- auth_restricted_email_sending: '/project/[ref]/settings/auth',
+ auth_email_rate_limit: '/project/[ref]/auth/rate-limits',
+ auth_restricted_email_sending: '/project/[ref]/auth/smtp',
default: (metric: string) => `/project/[ref]/settings/[infra-path]#${metric}`,
}