-2

I am using Symfony Security for the login functionality. My username field is encrypted in the database and I guess that Symfony Security is not able to find the correct user when logging in, because of that.

Currently I have an empty login action, which it says in the docs that I should have:

/**
 * @Route("/login", name="login")
 */
public function loginAction(Request $request)
{
}

I wonder if I could in some way encrypt the username in the request before sending it to Symfonys bundled login method. I guess that I have to extend this loginAction in some way? Or is it just overridden by Symfony?

rablentain
  • 6,641
  • 13
  • 50
  • 91

1 Answers1

0

use a custom provider to encrypte $username before you search User entity with username

T. Abdelmalek
  • 418
  • 3
  • 10