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.