guruahn / vue3-google-oauth2-front-sample

vue3환경에서의 vue-google-oauth2 테스트.
MIT License
20 stars 17 forks source link

How to get name of the user #3

Open isuryanarayanan opened 3 years ago

isuryanarayanan commented 3 years ago

Idk what scope gives me the username

Nizzy94 commented 2 years ago

console log the response in your function. it returns an object that contains the details. automatically, the package stores it as the string characters before the "@" symbol in the email. I think you'll have to call it directly from the database.

yrx00go commented 2 years ago

you can get name by changing 'app.use(gAuthPlugin, { clientId: gauthClientId, scope: 'email', prompt: 'consent', fetch_basic_profile: false }) ' to 'app.use(gAuthPlugin, { clientId: gauthClientId})'. Please click https://developers.google.com/identity/sign-in/web/reference#gapiauth2clientconfig for details.