import React from "react"; import SAMLConfiguration from "@ee/components/saml/Configuration"; import { identityProviderNameMap } from "@lib/auth"; import { useLocale } from "@lib/hooks/useLocale"; import { trpc } from "@lib/trpc"; import SettingsShell from "@components/SettingsShell"; import Shell from "@components/Shell"; import ChangePasswordSection from "@components/security/ChangePasswordSection"; import TwoFactorAuthSection from "@components/security/TwoFactorAuthSection"; import { IdentityProvider } from ".prisma/client"; export default function Security() { const user = trpc.useQuery(["viewer.me"]).data; const { t } = useLocale(); return ( {user && user.identityProvider !== IdentityProvider.CAL ? ( <>

{t("account_managed_by_identity_provider", { provider: identityProviderNameMap[user.identityProvider], })}

{t("account_managed_by_identity_provider_description", { provider: identityProviderNameMap[user.identityProvider], })}

) : ( <> )}
); }