Skip to content
Advertisement

Auth::validate returns false Laravel 8

Well i am trying to do a authentication via Laravel using Auth::validate($credenciais); and its not working.

JavaScript

I try to login with username:teste@teste and pwd=teste and he returns me false when should be true.

in database:

teste@teste $2y$10$UzU3EUMdt3EcZ9.1YtkLrO5XOTfCy7C0odIJVblkLbCCveA2BoVVy <—- Hashed password using Hash::make(‘teste);

Advertisement

Answer

The array sent to Auth::validate() must have the indexes email and password. (if you are using default auth of laravel)

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