Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix(studio): use public support link on MFA sign-in error (#46382)

Terry Suttonfc7f7f105ac1
diff --git a/apps/studio/components/interfaces/SignIn/SignInMfaForm.tsx b/apps/studio/components/interfaces/SignIn/SignInMfaForm.tsx
index e143b2c5d2e..8cdc77f0024 100644
--- a/apps/studio/components/interfaces/SignIn/SignInMfaForm.tsx
+++ b/apps/studio/components/interfaces/SignIn/SignInMfaForm.tsx
@@ -103,10 +103,18 @@ export const SignInMfaForm = ({ context = 'sign-in' }: SignInMfaFormProps) => {
<AlertError
error={error}
subject="Error while signing in"
+ hideContactSupport
additionalActions={
- <Button asChild type="default">
- <Link href="/sign-in">Back to sign in</Link>
- </Button>
+ <>
+ <Button asChild type="default">
+ <Link href="/sign-in">Back to sign in</Link>
+ </Button>
+ <Button asChild type="default">
+ <Link href="https://supabase.com/support" target="_blank" rel="noreferrer">
+ Contact support
+ </Link>
+ </Button>
+ </>
}
/>
)
diff --git a/apps/studio/components/ui/AlertError.tsx b/apps/studio/components/ui/AlertError.tsx
index e4358a95b8b..8b1d859225a 100644
--- a/apps/studio/components/ui/AlertError.tsx
+++ b/apps/studio/components/ui/AlertError.tsx
@@ -17,6 +17,7 @@ export interface AlertErrorProps {
showInstructions?: boolean
showErrorPrefix?: boolean
additionalActions?: React.ReactNode
+ hideContactSupport?: boolean
}
export const ContactSupportButton = ({
@@ -57,6 +58,7 @@ export const AlertError = ({
showErrorPrefix = true,
children,
additionalActions,
+ hideContactSupport = false,
}: PropsWithChildren<AlertErrorProps>) => {
const track = useTrack()
const hasTrackedRef = useRef(false)
@@ -95,7 +97,9 @@ export const AlertError = ({
</>
}
actions={
- additionalActions ? (
+ hideContactSupport ? (
+ (additionalActions ?? null)
+ ) : additionalActions ? (
<>
{additionalActions}
<ContactSupportButton projectRef={projectRef} subject={subject} error={error} />