Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP PHP User Authentication Adding Authentication to Your Application Working with Cookies

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

[SOLVED] Registration and login not working

Hi everyone,

I'm having another go at getting a working version of this application working and hit a stumbling block when the login wasn't redirecting to the home page with the "logged in" echo. So I don't think the registration has worked. My app either has dozens of versions of user accounts added or none at all lol

I've spent some time looking at my JWT configuration, functions and procedures and can't find the problem. Would appreciate a pointer or two. :)

I've been developing this on localhost but put the latest version up on my server. https://projects.jonniegrieve.co.uk/php_auth/

I also have the latest commit here on my repo. https://bitbucket.org/jg_digitalMedia/php_auth

Joel Bardsley
Joel Bardsley
31,249 Points

Hi Jonathan, just tried to take a look on your bitbucket repo but it's given me an 'Access denied' error after logging in, so you may need to update a privacy setting on your repo.

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,253 Points

So sorry... I really should remember to review the privacy settings when I'm sharing my repos :)

Should be available now.

1 Answer

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

Just to let you know I eventually resolved this. I was using the wrong value for the get() method on the confirm password input field which is why it wasn't redirecting.

I was earlier able to download a DB browser so I could look at the database and verified I wasn't getting any registrations into the database and therefore no logins. Now I know why. :)