deserializeUser() is throwing null errors authenticating with github

I’m working through https://www.freecodecamp.org/learn/quality-assurance/advanced-node-and-express/implementation-of-social-authentication and I’ve implemented a passport-github (and passport-steam on my own) strategy.

However deserializeUser is throwing a null error during the following scenario: User is not in the database nor has a token on github. This causes the user to be redirected to ‘/’ as if the auth failed, but the user gets created in the database. Upon a second click is when I’m logged in and directed to the proper route. This happens with both steam and github.

I’ll post my github project and i would really appreaciate if someone would look at my code.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.