Skip to content
Advertisement

How to debug symfony4 authentication failure

I am trying to set up a traditional login and registration form following the symfony 4 documentation.

Using the registration form I seem to be able to register users correctly into the mariaDB database on arch linux.


I am using the symfony development server. When I try to login with a registered user, I get this HTML on the login page

Authentication request could not be processed due to a system problem.

If the user or the password are bad or if I don’t fill the fields, I get the same error.

Starting the symfony 4 development with -vvv verboses displays

JavaScript

Using the network inspector of Firefox it seems that the loggin post returns error 302. I don’t know how to debug this, or how to obtain more informations.


This is security.yaml

JavaScript

I don’t use the username, so I removed it from the User class and the register Controller, and made user.getUsername return the user email, as suggested by the doc.

Advertisement

Answer

Your problem is the following:

JavaScript

In security yaml just replace it with email as you don’t use the username variable from the user interface.

To find out, use the web helper bundle to analyse the request that returned 302.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement