Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(options/mfa): significant calls to OAuth status endpoint
Elian Dorana0a904766fe5
diff --git a/apps/client/src/widgets/type_widgets/options/multi_factor_authentication.tsx b/apps/client/src/widgets/type_widgets/options/multi_factor_authentication.tsxindex 67ebc677ec..bc8fb5b733 100644--- a/apps/client/src/widgets/type_widgets/options/multi_factor_authentication.tsx+++ b/apps/client/src/widgets/type_widgets/options/multi_factor_authentication.tsx@@ -30,7 +30,7 @@ export default function MultiFactorAuthenticationSettings() {)}-function EnableMultiFactor({ mfaEnabled, setMfaEnabled }: { mfaEnabled: boolean, setMfaEnabled: (newValue: boolean) => Promise<void>}) {+function EnableMultiFactor({ mfaEnabled, setMfaEnabled }: { mfaEnabled: boolean, setMfaEnabled: (newValue: boolean) => Promise<void>}) {return (<OptionsSection title={t("multi_factor_authentication.title")}><FormText><Trans i18nKey="multi_factor_authentication.description" /></FormText>@@ -63,7 +63,7 @@ function MultiFactorMethod() {{ mfaMethod === "totp"? t("multi_factor_authentication.totp_description"): <RawHtml html={t("multi_factor_authentication.oauth_description")} /> }- </FormText>+ </FormText></OptionsSection>{ mfaMethod === "totp"@@ -159,7 +159,7 @@ function TotpSettings() {function TotpRecoveryKeys({ values, generateRecoveryKeys }: { values?: string[], generateRecoveryKeys: () => Promise<void> }) {return (- <OptionsSection title={t("multi_factor_authentication.recovery_keys_title")}>+ <OptionsSection title={t("multi_factor_authentication.recovery_keys_title")}><FormText>{t("multi_factor_authentication.recovery_keys_description")}</FormText>{values ? (@@ -182,7 +182,7 @@ function TotpRecoveryKeys({ values, generateRecoveryKeys }: { values?: string[],} else {text = t("multi_factor_authentication.recovery_keys_unused", { index: key });}-+return <li>{text}</li>})}</ol>@@ -207,7 +207,7 @@ function OAuthSettings() {useEffect(() => {server.get<OAuthStatus>("oauth/status").then(setStatus);- });+ }, []);return (<OptionsSection title={t("multi_factor_authentication.oauth_title")}>@@ -235,4 +235,4 @@ function OAuthSettings() {)}</OptionsSection>)-}\ No newline at end of file+}