diff --git a/src/Pages/TwoFactor.php b/src/Pages/TwoFactor.php index c503e2c..90b67ce 100644 --- a/src/Pages/TwoFactor.php +++ b/src/Pages/TwoFactor.php @@ -275,12 +275,14 @@ public function disableTwoFactorAuthentication(DisableTwoFactorAuthentication $d { $disable($this->user); - Notification::make() - ->title(__('Two-Factor Authentication deactivated')) - ->body(__('You can now log in without a code.')) - ->success() - ->duration(5000) - ->send(); + if ($this->user->two_factor_confirmed_at) { + Notification::make() + ->title(__('Two-Factor Authentication deactivated')) + ->body(__('You can now log in without a code.')) + ->success() + ->duration(5000) + ->send(); + } $this->showingQrCode = false; $this->showingConfirmation = false;