# Username and Password Auth fail

**URL:** <https://discourse.cakephp.org/t/username-and-password-auth-fail/7772>\
**Category:** Need Help\
**Created:** [May 2, 2020, 7:55pm UTC](https://discourse.cakephp.org/t/username-and-password-auth-fail/7772 "2020-05-02T19:55:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cavatoni](https://avatars.discourse-cdn.com/v4/letter/c/a698b9/32.png) [@cavatoni](https://discourse.cakephp.org/u/cavatoni)\
**Post date:** [May 2, 2020, 7:55pm UTC](https://discourse.cakephp.org/t/username-and-password-auth-fail/7772/1 "2020-05-02T19:55:36Z")

</div>

Hi folks,

I followed the tutorial [https://book.cakephp.org/4/en/tutorials-and-examples/blog-auth-example/auth.html](https://book.cakephp.org/4/en/tutorials-and-examples/blog-auth-example/auth.html)  
…to build my app Auth.

But when I log in, I encounter the error “Username and password invalid”.

My Users table is correct with the username and password.

I’ve tried everything.  
Any suggestion?

Thank you

---

<div class="post-metadata">

**Author:** ![drtrppr](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/drtrppr/32/1763_2.png) [@drtrppr](https://discourse.cakephp.org/u/drtrppr)\
**Post date:** [May 2, 2020, 8:53pm UTC](https://discourse.cakephp.org/t/username-and-password-auth-fail/7772/2 "2020-05-02T20:53:54Z")

</div>

I build myself a sort of 10-step checklist which helps me to do the right steps. Maybe it helps you to get things up and running:

[My 10 step authentication plugin install (CakePHP 4)](https://discourse.cakephp.org/t/authentication-plugin-install-use/7636/32)

---

<div class="post-metadata">

**Author:** ![anon81960487](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@anon81960487](https://discourse.cakephp.org/u/anon81960487)\
**Post date:** [May 11, 2020, 6:52am UTC](https://discourse.cakephp.org/t/username-and-password-auth-fail/7772/3 "2020-05-11T06:52:09Z")

</div>

Make sure the URL is /users/login. I have tons of issues with that.

---

<div class="post-metadata">

**Author:** ![Abelferretti](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@Abelferretti](https://discourse.cakephp.org/u/Abelferretti)\
**Post date:** [March 24, 2022, 1:14pm UTC](https://discourse.cakephp.org/t/username-and-password-auth-fail/7772/4 "2022-03-24T13:14:59Z")

</div>

Make sure that your password is not a hash password. Try delete the old and create a new.  
When you implement hash encrypt u need make new password.  
look the users table on the phpMyAdmin. If u get read the password, this is wrong!
