->mfaValues()
->get(['id', 'method'])
->groupBy('method');
+
+ $this->setPageTitle(trans('auth.mfa_setup'));
+
return view('mfa.setup', [
'userMethods' => $userMethods,
]);
/**
* Remove an MFA method for the current user.
+ *
* @throws \Exception
*/
public function remove(string $method)
// 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,
]);
}