Solvedangularfire auth.login() Error "location.protocol" must be http or https
✔️Accepted Answer
does it make sense to add some Help Wanted!
or other label to raise the importance/severity? looks like this is actually a blocker for ionic/phonegap apps.
Other Answers:
I don't know who is developing AngularFire2 but the problem is on the Firebase side.
I contact the Firebase team and this the answer:
Are you using popup / redirect sign in methods in Firebase 3.x.x? If so, these methods are currently not supported in native Ionic/Cordova apps. Sorry about that.
As a workaround, I recommend to use a library for OAuth such as ngCordova(in Cordova and Ionic apps) and then use auth().signInWithCredential(...) to sign your users in.
@Lindstrom1989 @jgw96 This solution using ionic-native facebook plugin to get the accessToken, creates the credential and then successfully logs in using angularFire2
https://github.com/aaronksaunders/basicaf2
https://javebratt.com/ionic-social-login-firebase/
Follow this guide...It worked for me
signInWithRedirect seems to have the same issue than signInWithPopup()
auth.login()
has an error when attempting to authenticate with Google or Facebook on an iOS or Android device using Cordova.Here is a code sample:
Running version
2.0.0-beta.3-0930330
of angularfire2.When run in a Cordova app the error callback will be called with this message: