markitosgv/JWTRefreshTokenBundle

Unable to find the controller for path \"/api/token/refresh\". The route is wrongly configured.

mlcpro opened this issue · 2 comments

Hello in Symfony 6 it seems that the controller is not supported with the /api... route can you update the bundle please

No problem in symfony 6 and 7 with that in routes.yaml

api_refresh_token:
    path: /api/token/refresh

I had the same issue and I found a solution by not using the route name in the check_path, use the path directly instead

firewalls:
        api:
            pattern: ^/api
            stateless: true
            entry_point: jwt
            json_login:
                check_path: /api/login # or, if you have defined a route for your login path, the route name you used
                success_handler: lexik_jwt_authentication.handler.authentication_success
                failure_handler: lexik_jwt_authentication.handler.authentication_failure
            jwt: ~
            refresh_jwt:
                check_path: /api/token/refresh