DEV Community

Discussion on: OAuth 2.0 with Google API in Node.js

Collapse
 
rinah profile image
rinahs

what is this code you use in getUserDetails

Collapse
 
nipeshkc7 profile image
Arpan Kc

So basically, what it does is,

  1. it takes out the 'token' from the code received
  2. adds the token to the Oauth2Client credentials (which is used to fetch the user data)
  3. Fetches the user's data from Google.