X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/cac31b2074cc0429423ffe7b8646ca0b5b367fe6..refs/pull/3693/head:/app/Http/Controllers/Auth/MfaController.php diff --git a/app/Http/Controllers/Auth/MfaController.php b/app/Http/Controllers/Auth/MfaController.php index 75cd46eef..6f6beb873 100644 --- a/app/Http/Controllers/Auth/MfaController.php +++ b/app/Http/Controllers/Auth/MfaController.php @@ -20,6 +20,9 @@ class MfaController extends Controller ->mfaValues() ->get(['id', 'method']) ->groupBy('method'); + + $this->setPageTitle(trans('auth.mfa_setup')); + return view('mfa.setup', [ 'userMethods' => $userMethods, ]); @@ -27,6 +30,7 @@ class MfaController extends Controller /** * Remove an MFA method for the current user. + * * @throws \Exception */ public function remove(string $method) @@ -56,13 +60,13 @@ class MfaController extends Controller // Basic search for the default option for a user. // (Prioritises totp over backup codes) $method = $userMethods->has($desiredMethod) ? $desiredMethod : $userMethods->keys()->sort()->reverse()->first(); - $otherMethods = $userMethods->keys()->filter(function($userMethod) use ($method) { + $otherMethods = $userMethods->keys()->filter(function ($userMethod) use ($method) { return $method !== $userMethod; })->all(); return view('mfa.verify', [ - 'userMethods' => $userMethods, - 'method' => $method, + 'userMethods' => $userMethods, + 'method' => $method, 'otherMethods' => $otherMethods, ]); }