Chapter 11 Auth Component

3 messages Options
Embed this post
Permalink
ZHarris

Chapter 11 Auth Component

Reply Threaded More More options
Print post
Permalink
Hi David,

I'm hoping you can help. As far as I can tell, I've followed everything exactly the way you've described it in the book, but whenever I try to login I get the message "Login failed. Invalid username or password."

Is there something I'm missing? Can I add a new user directly to my Database? Should I do it in views/users/add?

Thanks!
David Golding

Re: Chapter 11 Auth Component

Reply Threaded More More options
Print post
Permalink
Whenever I've encountered errors with Auth, it's almost always because the way the password is being saved in the database isn't consistent. In other words, you'll need the Auth component to apply its encryption method to the password when you create the password. Try checking the encrypted string and run some tests to view passwords, etc., to make sure that both the password checking and password creating are consistent with each other.
ZHarris

Re: Chapter 11 Auth Component

Reply Threaded More More options
Print post
Permalink
I guess I'm not really sure how to test them. Is there something I can add to the password input of the user form when adding a new user?

Thanks for the quick response.