Skip to content

Commit ef94d45

Browse files
auth.throttle time countdown added
1 parent dc6206d commit ef94d45

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Middleware/Throttle.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@ public function handle($request, Closure $next)
3737

3838
protected function getToManyAttemptsMessage()
3939
{
40-
return Lang::has('auth.to_many_attempts')
41-
? trans('auth.to_many_attempts')
42-
: 'To many attempts!';
40+
$seconds = RateLimiter::availableIn('login-tries-' . Admin::guardName());
41+
42+
$message = Lang::has('auth.throttle')
43+
? trans('auth.throttle', ['seconds' => $seconds])
44+
: "Too many login attempts. Please try again in " . $seconds . " seconds.";
45+
46+
return $message;
4347
}
4448
}

0 commit comments

Comments
 (0)