Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to get user info from google oauth node js

const response = await oAuth2Client.getToken(code);
const userInfo = JSON.parse(Buffer.from(response.tokens.id_token.split('.')[1], 'base64').toString());

console.log(userInfo);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #user #info #google #oauth #node #js
ADD COMMENT
Topic
Name
8+5 =