Closed dperkosan closed 4 years ago
I'm having this error when I try to login from VSF.
Unable to find the controller for path "/vsbridge/user/login". The route is wrongly configured.
But your solution didn't work either. Any idea ?
This problem is related to an order of firewalls in your security.yaml
file.
Configuration from the README should be put first before any other firewalls, just like that:
security:
always_authenticate_before_granting: true
providers:
sylius_admin_user_provider:
id: sylius.admin_user_provider.email_or_name_based
sylius_shop_user_provider:
id: sylius.shop_user_provider.email_or_name_based
encoders:
Sylius\Component\User\Model\UserInterface: argon2i
firewalls:
vs_bridge_user_login:
pattern: "%bitbag.vue_storefront.security.regex%/user/login"
stateless: true
anonymous: true
provider: sylius_shop_user_provider
json_login:
provider: sylius_shop_user_provider
check_path: /vsbridge/user/login
password_path: password
success_handler: bitbag_sylius_vue_storefront_plugin.lexik_jwt_authentication.handler.authentication_success
failure_handler: bitbag_sylius_vue_storefront_plugin.lexik_jwt_authentication.handler.authentication_failure
require_previous_session: false
vs_bridge:
pattern: "%bitbag.vue_storefront.security.regex%"
stateless: true
anonymous: true
provider: sylius_shop_user_provider
guard:
provider: sylius_shop_user_provider
authenticators:
- lexik_jwt_authentication.jwt_token_authenticator
I'll add a note about it to the README and I'm closing this issue.
In order for login to work, in security.yaml, insted of this: