I'm trying to implement the Google OAuth Passport.js strategy but due to the lack of documentation and examples, I can't seem to able to answer certain questions.
My application is using bearers rather than cookies for security and technological reasons.
The single example available on the passport-google-oauth GitHub page doesn't explain certain things like:
accessToken
and refreshToken
?I really don't want to use cookies because that would create a second authorization system that is a duplicate of the bearer strategy already in place.
This question could be applied to other passport OAuth strategies like Twitter and Facebook.
I managed to find all the answers needed in this excellent blog post:
http://jeroenpelgrims.com/token-based-sessionless-auth-using-express-and-passport/
and the corresponding source code:
Thanks to Jeroen Pelgrims!