loopback icon indicating copy to clipboard operation
loopback copied to clipboard

req.user is undefined for Third Party login passport on heroku.

Open x0cipher opened this issue 11 years ago • 1 comments

Hi,

I am try to create a project using Loopback Third Party API and Angular SDK, The weird part is everything is working fine on localhost when using "/auth/google" but when hosting the application on Heroku, the user param under "/auth/success" is coming undefined.

Has anyone faced a similar issue, need help! Thanks.

x0cipher avatar Sep 22 '15 04:09 x0cipher

Done! It's working now.

It was a silly miss on my part:

For access_token to be set into the response header I was using req.signedCookies["access_token"]

But for userId I used ~~req.userId~~ which did not exist, since it was under req.signedCookies["userId"]

x0cipher avatar Sep 23 '15 09:09 x0cipher