From bf362181c589071c143863fe86c810a78c123734 Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Fri, 19 Apr 2024 18:28:52 -0700 Subject: [PATCH] feat(mfa): add back button on verify identity page Provide a way for a user to go back/cancel so that they can clear their session. Otherwise, they would need to dig into their browser settings to delete the cookie and/or fallback header. This only adds the button on desktop because the button doesn't fit right on mobile. --- src/lib/layout/unauthenticated.svelte | 3 +- src/routes/mfa/+page.svelte | 42 +++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/src/lib/layout/unauthenticated.svelte b/src/lib/layout/unauthenticated.svelte index 7c16c7a8d..2a117664b 100644 --- a/src/lib/layout/unauthenticated.svelte +++ b/src/lib/layout/unauthenticated.svelte @@ -38,7 +38,8 @@

Build like a team of hundreds_

-
+
+

diff --git a/src/routes/mfa/+page.svelte b/src/routes/mfa/+page.svelte index 237dc15c0..389889db7 100644 --- a/src/routes/mfa/+page.svelte +++ b/src/routes/mfa/+page.svelte @@ -39,6 +39,11 @@ } }); + async function back() { + await sdk.forConsole.account.deleteSession('current'); + await goto(`${base}/`); + } + async function verify() { try { disabled = true; @@ -75,6 +80,15 @@ + +
+
+ +
+
+
Verify your identity
@@ -163,3 +177,31 @@
+ +