You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the Lexik Bundle to secure my API (API Platform), as well as to authenticate users via login (Symfony UX React). However, the redirection on custom authentication is not working. I receive a 200 status code and the "view" in response looks good, but nothing happens (it stays on the login page). Any ideas? Or is there a better way to implement the logic?
security:
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwordspassword_hashers:
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'# https://symfony.com/doc/current/security.html#loading-the-user-the-user-providerproviders:
app_user_provider:
entity:
class: App\Entity\Userproperty: emailfirewalls:
login:
pattern: ^/api/loginstateless: truejson_login:
check_path: /api/login_checkusername_path: emailsuccess_handler: app.listener.authentication_success_responsefailure_handler: lexik_jwt_authentication.handler.authentication_failureapi:
pattern: ^/api/stateless: truejwt: ~# activate different ways to authenticate# https://symfony.com/doc/current/security.html#the-firewall# https://symfony.com/doc/current/security/impersonating_user.html# switch_user: true# Easy way to control access for large sections of your site# Note: Only the *first* access control that matches will be usedaccess_control:
- { path: ^/api/login, roles: PUBLIC_ACCESS }
- { path: ^/api, roles: IS_AUTHENTICATED_FULLY }
I am using the Lexik Bundle to secure my API (API Platform), as well as to authenticate users via login (Symfony UX React). However, the redirection on custom authentication is not working. I receive a 200 status code and the "view" in response looks good, but nothing happens (it stays on the login page). Any ideas? Or is there a better way to implement the logic?
AuthenticationSuccessListener.php
security.yml
services.yml
Login.jsx
Controller (Where I want to redirect)
View
The text was updated successfully, but these errors were encountered: