From b8ca3344e34c6390803cfb2ac442bd181e8e6140 Mon Sep 17 00:00:00 2001 From: Baspa Date: Fri, 16 Aug 2024 12:57:49 +0200 Subject: [PATCH] Fix showing QR codes --- src/Pages/TwoFactor.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Pages/TwoFactor.php b/src/Pages/TwoFactor.php index 0ed60a5..6eb1315 100644 --- a/src/Pages/TwoFactor.php +++ b/src/Pages/TwoFactor.php @@ -121,9 +121,14 @@ public function enableAction(): Action $formData['two_factor_type'] = TwoFactorType::tryFrom($this->twoFactorData['option']); } + if ($formData['two_factor_type'] === TwoFactorType::email) { + $this->showQrCode = false; + } else { + $this->showQrCode = true; + } + if (count($formData) > 0) { auth()->user()->update($formData); - $this->showQrCode = true; } $this->enableTwoFactorAuthentication(app(EnableTwoFactorAuthentication::class));