X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/f1f59cf0861adb8f753f3685ff3c82c048ed4838..refs/pull/2827/head:/app/Http/Controllers/Auth/MfaBackupCodesController.php diff --git a/app/Http/Controllers/Auth/MfaBackupCodesController.php b/app/Http/Controllers/Auth/MfaBackupCodesController.php index 65c809196..4b4e11659 100644 --- a/app/Http/Controllers/Auth/MfaBackupCodesController.php +++ b/app/Http/Controllers/Auth/MfaBackupCodesController.php @@ -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'); }