简体   繁体   中英

Firebase Authentication In Facebook Browser Not Working

I have the following code to log in a user with a Google Account.

firebase.auth().signInWithPopup(provider).then(function(result) {
}).catch(function(error) {
});

When the login is complete, it fires the following code:

firebase.auth().onAuthStateChanged(function(me) {
    if (me) {
        //user logged in
    }
});

In Chrome, Firefox, the PWA, and other browsers fire the event listener to let the user login. The Facebook Inline Browser is the only one that doesn't proceed with the sign-in process. Why is this, and how can I fix it?

I found the source of my bug. I was checking for notification permissions on an iOS device without push notification support, generating an error. The workaround was to disable push notifications on iOS devices and alert the user.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM