diff --git a/apps/web/pages/settings/security/two-factor-auth.tsx b/apps/web/pages/settings/security/two-factor-auth.tsx index 5e9bf10677..c646770411 100644 --- a/apps/web/pages/settings/security/two-factor-auth.tsx +++ b/apps/web/pages/settings/security/two-factor-auth.tsx @@ -3,7 +3,7 @@ import { useState } from "react"; import { getLayout } from "@calcom/features/settings/layouts/SettingsLayout"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; -import { Badge, Meta, Switch, SkeletonButton, SkeletonContainer, SkeletonText } from "@calcom/ui"; +import { Badge, Meta, Switch, SkeletonButton, SkeletonContainer, SkeletonText, Alert } from "@calcom/ui"; import DisableTwoFactorModal from "@components/settings/DisableTwoFactorModal"; import EnableTwoFactorModal from "@components/settings/EnableTwoFactorModal"; @@ -32,11 +32,14 @@ const TwoFactorAuthView = () => { if (isLoading) return ; + const isCalProvider = user?.identityProvider === "CAL"; return ( <> + {!isCalProvider && }
user?.twoFactorEnabled ? setDisableModalOpen(true) : setEnableModalOpen(true) diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index e6beceb1cf..902037eee7 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -404,6 +404,7 @@ "add_time_availability": "Add new time slot", "add_an_extra_layer_of_security": "Add an extra layer of security to your account in case your password is stolen.", "2fa": "Two-Factor Authentication", + "2fa_disabled":"Two-Factor authentication can only be enabled for email and password authentication", "enable_2fa": "Enable two-factor authentication", "disable_2fa": "Disable two-factor authentication", "disable_2fa_recommendation": "If you need to disable 2FA, we recommend re-enabling it as soon as possible.",