Ionic 3 error to try to authenticate with Google or Facebook
Hi, I´m creating an Ionic 3 App with Angularfire2, and it has some problems when I compile it in an Android device and I try to login by Google or Facebook, the last week it works all right, but I do some tests today and it launch some environment errors.
Version info
Angular: 4.1.3
Firebase: 4.3.0
AngularFire: 4.0.0-rc.2
Cordova: 7.0.1
Ionic: 3.9.2
Also add promise-polyfill 6.0.2, because I show it in docs/Auth-with-Ionic3-Angular4 and Authentication instructions with Cordova an Firebase.
How to reproduce these conditions
When app is running on Android device, it can login by email and password, but it launch an error when I try to login by Google or Facebook:
{
code: "auth/operation-not-supported-in-this-environment",
message: "This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled."
}
My authentication code is:
- AuthProvider:
constructor(private angularFireAuth: AngularFireAuth) { }
public SignInWithGoogle(): firebase.Promise<any> {
let provider = new firebase.auth.GoogleAuthProvider();
return this.angularFireAuth.auth.signInWithPopup(provider)
.then(res => console.info(res))
.catch(err => console.error(err));
}
public SignInWithFacebook(): firebase.Promise<any> {
let provider = new firebase.auth.FacebookAuthProvider();
return this.angularFireAuth.auth.signInWithPopup(provider)
.then(res => console.info(res))
.catch(err => console.error(err));
}
The last week it works all right.
@ivanhdzd Can you reproduce the error with a simplified version of your code containing nothing but the instructions in the community guide? If so, we might be able to take a look. If not, this is probably outside the scope of what we can help debug, given there's no minimal repro here.
@katowulf why has been the issue closed? @ivanhdzd do you solve the problem?
@Wanted92 I had to downgrade Angularfire2 to 4.0.0-rc.1:
[npm install --save-exact | yarn add --exact] [email protected]
I am facing same issue
Facing the same issue "angularfire2": "^5.0.0-rc.7.0-next",