更新时间:2023-12-06 08:33:40
对于@jasan的请求,我确实找到了基于@bojeil的评论的解决方案
Per @jasan 's request, I did find a solution based on @bojeil 's comment
function signinGoogle(cb) {
var provider = new firebase.auth.GoogleAuthProvider();
// firebase.auth().signInWithPopup(provider).then(function(result) {
firebase.auth().signInWithRedirect(provider).then(function(result) {
console.log("Google signin successful")
// This gives you a Google Access Token. You can use it to access the Google API.
// var token = result.credential.accessToken;
// Send user to rest of program
cb(token)
})
.catch(function(error) {
logger(error);
});
}