vue-hellojs icon indicating copy to clipboard operation
vue-hellojs copied to clipboard

how i get user email

Open hizone opened this issue 6 years ago • 3 comments

how i get to my profile or const authRes = hello('google').getAuthResponse(); the email of the user?

hizone avatar Dec 27 '18 10:12 hizone

Same question. The response just:

access_token: "EAAEd1GFK49ABAFlUjGeZBimklBVZAOI9PErMUAksjmx***"
client_id: "314272979***"
data_access_expiration_time: "1560910561"
display: "popup"
expires: 1553140805.797
expires_in: 6239
network: "facebook"
reauthorize_required_in: "7776000"
redirect_uri: "http://localhost:8080/authcallback/"
scope: "basic"
state: ""

andriyfm avatar Mar 21 '19 02:03 andriyfm

@Haizone @andriyfm in your HelloJs.init just add scope "email" to get user email, just take a look a documentation about hellojs scope http://adodson.com/hello.js/#scope or documentation about your scope client you use ex :

HelloJs.init(
  {
    google: // your client id
    facebook: // your client id
  },
  {
    redirect_uri: your redirect callback
    scope: "email"
  }
);

this example just get user email, if u need more advance just separate it with coma (,)

frama21 avatar Mar 16 '20 09:03 frama21