feat(auth): integrate Captcha validation in PasswordAuthenticator
- Added CaptchaGuard dependency to PasswordAuthenticator. - Implemented Captcha validation in the authenticate method to enhance security. - Updated the login modal in home.html.twig to redirect to the admin panel instead of opening a modal. - Enhanced the Altcha widget with localized strings for better user experience. - Removed the login modal implementation from home.html.twig to streamline the login process. - Updated manifest.json and AST cache files to reflect changes in the codebase.
This commit is contained in:
@@ -45,6 +45,9 @@ endpointهایی که وقتی `ALTCHA_ENABLED=true` است فیلد `altcha` ر
|
||||
| `/api/v1/user/otp-login` | POST |
|
||||
| `/api/v1/user/reset-password` | POST |
|
||||
| `/api/v1/pre-registration` | POST |
|
||||
| `/api/v1/user/login` | POST |
|
||||
|
||||
> ورود با رمز عبور (`/api/v1/user/login`) توسط `PasswordAuthenticator` قبل از controller intercept میشود؛ کپچا داخل `authenticate()` (بعد از rate-limit) با `CaptchaGuard::assertValid()` بررسی میشود.
|
||||
|
||||
> endpointهای امتیاز/نظر (`POST /api/v1/rate`، `POST /api/v1/comment`) پشت JWT هستند (کاربر لاگینشده)، بنابراین کپچا نمیگیرند — بات برای رسیدن به آنها باید توکن معتبر داشته باشد که خودش از مسیر OTP (کپچادار) عبور میکند.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user