From 2ecc1536e2766d196bb7a535858188f30828d4ce Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Fri, 24 Apr 2026 01:19:10 +0300 Subject: [PATCH] Fix: Increase wallet login rate limit to 50 attempts --- app/Http/Controllers/AuthController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php index cf677c5..87c9e00 100644 --- a/app/Http/Controllers/AuthController.php +++ b/app/Http/Controllers/AuthController.php @@ -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);