Unable to find the controller for path "/api/login_check" Again
agatumm420 opened this issue · 0 comments
agatumm420 commented
I've encountered the same problem earlier but fix from the issue helped (i deleted ^ in fornt of api in security.yaml). Now the problem is back and nothing seems to help
security.yaml
`
security:
enable_authenticator_manager: true
password_hashers:
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
providers:
app_user_provider:
entity:
class: App\Entity\User
property: email
firewalls:
login:
pattern: /api/login
stateless: true
provider: app_user_provider
json_login:
username_path: email
check_path: api_login_check # or api_login_check as defined in config/routes.yaml
success_handler: lexik_jwt_authentication.handler.authentication_success
failure_handler: lexik_jwt_authentication.handler.authentication_failure
api:
pattern: /api
stateless: true
jwt:
authenticator: app.custom_authenticator
access_control:
- { path: /api, roles: PUBLIC_ACCESS}
- {path: /api/login_check, roles: PUBLIC_ACCESS}
routes.yaml
controllers:
resource: ../src/Controller/
type: attribute
kernel:
resource: ../src/Kernel.php
type: annotation
api_login_check:
path: api/login_check
`
I'll be greatfull for any direction, at this point I feel like I've run out of options.