问题
I am building a hybrid app using the ionic framework.
I'm using angularFire 2.0 with Firebase 3.0. I have the cordova plugin "inAppBrowser" installed.
In the depreciated Firebase documents, that's all I need to have authWithOAuthPopup() fire up an inAppBrowser window and do the login process.
Currently, I am using signInWithPopup() and it does nothing in my iOS app. The app works fine in browser using ionic serve.
回答1:
Firebase 3.0 signInWithPopup/Redirect is not currently supported in a Cordova environment even with inAppBrowser plugin installed. Until this is supported, you can use other plugins to get the OAuth response for Facebook, Google and then use signInWithCredential instead. You can use something like https://www.npmjs.com/package/cordova-plugin-facebook to get the Facebook access token and then sign in via auth.signInWithCredential(firebase.auth.FacebookAuthProvider.credential(fbAccessToken));
来源:https://stackoverflow.com/questions/37937496/cordova-inappbrowser-wont-work-with-firebaseauth