return view('mfa.totp-generate', [
'secret' => $totpSecret,
- 'svg' => $svg,
+ 'svg' => $svg,
]);
}
/**
* Confirm the setup of TOTP and save the auth method secret
* against the current user.
+ *
* @throws ValidationException
* @throws NotFoundException
*/
'required',
'max:12', 'min:4',
new TotpValidationRule($totpSecret),
- ]
+ ],
]);
MfaValue::upsertWithValue($this->currentOrLastAttemptedUser(), MfaValue::METHOD_TOTP, $totpSecret);
if (!auth()->check()) {
$this->showSuccessNotification(trans('auth.mfa_setup_login_notification'));
+
return redirect('/login');
}
/**
* Verify the MFA method submission on check.
+ *
* @throws NotFoundException
*/
public function verify(Request $request, LoginService $loginService, MfaSession $mfaSession)
'required',
'max:12', 'min:4',
new TotpValidationRule($totpSecret),
- ]
+ ],
]);
$mfaSession->markVerifiedForUser($user);