Search code examples
mysqllaravellaravel-authentication

I created a user in mySQL db (insert) but cannot login to Laravel application with that user


I recently created a couple of users in my database which is linked to a laravel application. When I register through the application, I can login just fine with that user but all the other users created in mySQL using insert are unable to login.

My error: These credentials do not match our records.

I used "php artisan make:auth" to generate login and register pages.

Is there some other elements that Laravel uses to authenticate the users apart from the email address and password?


Solution

  • Password are hashed from within the Authentication service of Laravel, in order to create a user, you should do so via php artisan tinker or via the provided Registration interface of the page.

    See: Laravel Manual Authentication