Symfony 3 Login Page just reloads. Not logged in afterwards.
lima-city → Forum → Programmiersprachen → PHP, MySQL & .htaccess
-
Hello community,
I´m trying to build a Symfony 3 application and I want to use two in_memory user accounts to authenticate. When I try to access any page I´m forwarded to login page successfully, but when I log in with correct credentials the login page just reloads and I´m not authenticated afterwards.
This is my security.yml:
# To get started with security, check out the documentation: # https://symfony.com/doc/current/security.html security: providers: in_memory: memory: users: test1: password: test123 roles: 'ROLE_USER' test2: password: test456 roles: 'ROLE_USER' encoders: AppBundle\Entity\User: algorithm: none # https://symfony.com/doc/current/security.html#b-configuring-how-users-are-loaded providers: databaseProvider: entity: class: AppBundle:User property: username firewalls: # disables authentication for assets and the profiler, adapt it according to your needs dev: pattern: ^/(_(profiler|wdt)|css|images|js)/ security: false login: pattern: /login security: false main: security: true pattern: ^/ http_basic: ~ provider: in_memory # activate different ways to authenticate # https://symfony.com/doc/current/security/form_login_setup.html form_login: login_path: login check_path: login
Once I found a github issue where someone told, that there is a problem with login_path and check_path. The error is made in the documentation already and he announced that the documentation will be corrected. It seems to me the documentation has not been corrected and unfortunately the user didn´t tell what exactly the error is.
So I hope I can now find help here.
Thanks in advance
JShaddix -
Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden!
lima-city: Gratis werbefreier Webspace für deine eigene Homepage
-
Those are very specific questions. Have you considered asking in the Github issues for a solution or contacting the team of the framework directly? I'm not sure, if someone can help you here.
-
Diskutiere mit und stelle Fragen: Jetzt kostenlos anmelden!
lima-city: Gratis werbefreier Webspace für deine eigene Homepage