Skip to content
This repository was archived by the owner on Apr 19, 2025. It is now read-only.

Commit 09ad408

Browse files
committed
#11: Redirect with error message
1 parent 1786d83 commit 09ad408

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Http/Controllers/TwoFactorAuthenticatesUsers.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ protected function handleFailedAttempt(Request $request)
133133
$this->incrementTwoFactorAuthAttempts($request);
134134

135135
if ($path = $this->redirectAfterFailurePath()) {
136-
return redirect($path);
136+
return redirect()->to($path)->withErrors([
137+
'token' => __('twofactor-auth::twofactor-auth.failed'),
138+
]);
137139
}
138140

139141
return $this->sendFailedTwoFactorAuthResponse($request);

0 commit comments

Comments
 (0)