jaredhanson / passport-google-oauth2

Google authentication strategy for Passport and Node.js.
https://www.passportjs.org/packages/passport-google-oauth20/?utm_source=github&utm_medium=referral&utm_campaign=passport-google-oauth20&utm_content=about
MIT License
812 stars 154 forks source link

Using it with other google api #70

Open pranshuchittora opened 4 years ago

pranshuchittora commented 4 years ago

What's the ideal way of calling the other google API with the same auth. Like making a request to the Google Drive API, etc.

WORMSS commented 3 years ago

In the serialise/deserialise functions, you will be given a token that represents the user. You should then be able to request access to those APIs from that token (the user will have to additionally grant your app access to the APIs)

Ritish-Madan commented 3 years ago

@pranshuchittora Did you get any solution for the same?

pranshuchittora commented 3 years ago

@pranshuchittora Did you get any solution for the same?

Scraped that project :smile:

Ritish-Madan commented 3 years ago

@pranshuchittora Try this link

https://dev.to/aidanlovelace/how-to-setup-google-oauth2-login-with-express-2d30

They have got the things covered. Well passport-google-oauth has hardcoded the data to be sent to profile. I found with the googleapis to fetch the same data.