From be527f8c197594af5d3b813bca5755c656d04bf3 Mon Sep 17 00:00:00 2001
From: Steven Nguyen
Date: Wed, 8 May 2024 09:33:46 -0700
Subject: [PATCH] feat(auth): hide MFA methods and recovery if MFA is disabled
---
src/routes/console/account/updateMfa.svelte | 145 ++++++++++----------
1 file changed, 74 insertions(+), 71 deletions(-)
diff --git a/src/routes/console/account/updateMfa.svelte b/src/routes/console/account/updateMfa.svelte
index 8949db486..447a2340b 100644
--- a/src/routes/console/account/updateMfa.svelte
+++ b/src/routes/console/account/updateMfa.svelte
@@ -95,99 +95,102 @@
href="https://appwrite.io/docs/products/auth/mfa">Learn more.
-
-
- Methods
-
-
-
-
-
-
-
- Authenticator app
- Use an authentication app to generate two-factor authentication
- codes.
-
+ {#if $user.mfa}
+
+
+ Methods
-
- {#if $factors.totp}
-
- {:else}
-
- {/if}
-
-
-
- {#if $factors.email}
-
+
- Email verification
- One-time codes will be sent to: {$user.email}
+ Authenticator app
+ Use an authentication app to generate two-factor authentication
+ codes.