firebase auth not work with PWA installed on Android desktop

為{幸葍}努か 提交于 2019-12-01 06:44:34

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);
    });
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!