loopback
loopback copied to clipboard
req.user is undefined for Third Party login passport on heroku.
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.
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"]