vue-hellojs
vue-hellojs copied to clipboard
how i get user email
how i get to my profile or const authRes = hello('google').getAuthResponse(); the email of the user?
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: ""
I think this is the solution: https://stackoverflow.com/questions/5707189/facebook-oauth-retrieve-user-email
@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 (,)