passport-google-oauth2 icon indicating copy to clipboard operation
passport-google-oauth2 copied to clipboard

User is not showing up in my req

Open SethKitchen opened this issue 7 years ago • 3 comments

I run this code and I login with Google, but no user is stored in req, so when it redirects back to the index page, it still shows "Login" and NOT "account". Why/How can this be?

I put a breakpoint in my "function (request, accessToken, refreshToken, profile, done) {" and it shows profile is filled with data and so I "return done(null, profile)", but I can't access profile or user anywhere else

SethKitchen avatar Jun 04 '17 20:06 SethKitchen

I have the same problem, did you manage to solve it? @SethKitchen

egnas avatar Feb 15 '18 02:02 egnas

Same issue here

DannyFeliz avatar Feb 15 '19 09:02 DannyFeliz

You mean in the example I suppose? This is presumably because the example doesn't actually set up any proper session storage (it just assumes there's a redis instance running somewhere, which doesn't really make sense.) The example really should be reworked to use an in-process memory storage solution to avoid having this external dependency.

mstade avatar Mar 06 '19 23:03 mstade