I am trying to get email and id of user through chrome identity api.
I am doing this
chrome.identity.getProfileUserInfo(function(userinfo){
console.log("userinfo",userinfo);
email=userinfo.email;
uniqueId=userinfo.id;
});
I have specified identity
permission and have added https://www.googleapis.com/auth/userinfo.email
in scopes.
User is logged in through chrome.identity.getAuthToken
and I have access token.
console.log("userinfo",userinfo);
returns userinfo Object {email: "", id: ""}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…