我正在尝试使用凭据accessToken获取电子邮件地址。有人知道怎么做吗?或我可以追踪的任何资源?
var provider = new firebase.auth.GithubAuthProvider();
provider.addScope('repo');
provider.setCustomParameters({
'allow_signup': 'false'
});
firebase.auth().signInWithPopup(provider).then(function(result) {
// This gives you a GitHub Access Token. You can use it to access the GitHub API.
var token = result.credential.accessToken;
// The signed-in user info.
var user = result.user;
// ...
console.log("token = " + token);
})