我正在尝试使用Google和Facebook登录我的Cordova应用上的Firebase。 我按照这个指南: https://firebase.google.com/docs/auth/web/cordova
但我仍然会收到此错误:
auth/operation-not-supported-in-this-environment
这是我的代码:
var provider = new window.parent.firebaseRef.auth.GoogleAuthProvider();
window.parent.firebaseRef.auth().signInWithRedirect(provider).then(function(result) {
var token = result.credential.accessToken;
}).catch(function(error) {
var errorCode = error.code;
var errorMessage = error.message;
Materialize.toast(errorMessage, 4000);
});