Fix: Increase wallet login rate limit to 50 attempts

This commit is contained in:
Hamza-Ayed
2026-04-24 01:19:10 +03:00
parent c7f3f09f0e
commit 2ecc1536e2

View File

@@ -441,9 +441,9 @@ class AuthController extends Controller
return $this->failure('Invalid audience', 403);
}
// Stricter rate limit for wallet
// Stricter rate limit for wallet (50 attempts per 2 minutes)
$rateLimitKey = 'wallet_login:' . $request->ip();
if (Cache::get($rateLimitKey, 0) >= 3) {
if (Cache::get($rateLimitKey, 0) >= 50) {
return $this->failure('Too many attempts', 429);
}
Cache::increment($rateLimitKey);
@@ -507,9 +507,9 @@ class AuthController extends Controller
return $this->failure('Invalid audience', 403);
}
// Rate limit
// Rate limit (50 attempts per 2 minutes)
$rateLimitKey = 'wallet_login_driver:' . $request->ip();
if (Cache::get($rateLimitKey, 0) >= 3) {
if (Cache::get($rateLimitKey, 0) >= 50) {
return $this->failure('Too many attempts', 429);
}
Cache::increment($rateLimitKey);