]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Auth/MfaBackupCodesController.php
Cleaned some unused elements during testing
[bookstack] / app / Http / Controllers / Auth / MfaBackupCodesController.php
index 65c809196c47c2206a085ee73560888cb11f1f70..4b4e11659852195111862c7b7235c1717f7bbe03 100644 (file)
@@ -49,6 +49,12 @@ class MfaBackupCodesController extends Controller
         MfaValue::upsertWithValue($this->currentOrLastAttemptedUser(), MfaValue::METHOD_BACKUP_CODES, json_encode($codes));
 
         $this->logActivity(ActivityType::MFA_SETUP_METHOD, 'backup-codes');
+
+        if (!auth()->check()) {
+            $this->showSuccessNotification(trans('auth.mfa_setup_login_notification'));
+            return redirect('/login');
+        }
+
         return redirect('/mfa/setup');
     }