From eb81b2a340bed8900f55c4a3fc2f656cffec6ae5 Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Thu, 15 Jan 2026 10:49:30 +0700 Subject: [PATCH] Fix toggling of prevent use of leaked passwords in auth config (#41912) * Allow disabling of prevent use leaked passwords config if enabled but downgraded to free plan * Simplify logic --- .../interfaces/Auth/AuthProvidersForm/ProviderForm.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx b/apps/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx index 32ddff87b35..daf0e8bbe13 100644 --- a/apps/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx +++ b/apps/studio/components/interfaces/Auth/AuthProvidersForm/ProviderForm.tsx @@ -1,10 +1,10 @@ import { PermissionAction } from '@supabase/shared-types/out/constants' import { Check } from 'lucide-react' +import { useTheme } from 'next-themes' import { useQueryState } from 'nuqs' import { useEffect, useState } from 'react' import ReactMarkdown from 'react-markdown' import { toast } from 'sonner' -import { useTheme } from 'next-themes' import { useParams } from 'common' import { Markdown } from 'components/interfaces/Markdown' @@ -214,6 +214,10 @@ export const ProviderForm = ({ config, provider, isActive }: ProviderFormProps) : description, } const isDisabledDueToPlan = properties.isPaid && isFreePlan + const shouldDisable = + properties.type === 'boolean' + ? isDisabledDueToPlan && !values[x] + : isDisabledDueToPlan return ( ) })}