在我的安卓手机上测试登录我的网页应用程序时,我收到以下消息:
“firebase.js:75 Uncaught Error: This operation is not supported in the environment this application is running on. "location.protocol" must be http or https..”
我已将我的firebase url添加到我的fb应用程序的有效OAuth重定向URI中 - https://.firebaseio.com/。我在firebase的auth部分中添加了我的应用程序ID和名称。我是否漏掉了什么?谢谢。
我在这里使用chrome远程调试:file:///android_asset/www/index.html#/app/people
这可能是它抗议的原因吗?
“firebase.js:75 Uncaught Error: This operation is not supported in the environment this application is running on. "location.protocol" must be http or https..”
我已将我的firebase url添加到我的fb应用程序的有效OAuth重定向URI中 - https://.firebaseio.com/。我在firebase的auth部分中添加了我的应用程序ID和名称。我是否漏掉了什么?谢谢。
我在这里使用chrome远程调试:file:///android_asset/www/index.html#/app/people
这可能是它抗议的原因吗?
var provider = new firebase.auth.FacebookAuthProvider();
console.log(provider);
firebase.auth().signInWithPopup(provider).then(function(result) {
// This gives you a Facebook Access Token. You can use it to access theFacebook API.
var token = result.credential.accessToken;
// The signed-in user info.
var user = result.user;
console.log(user, token);
UserService.setUser(user, token);
// ...
}).catch(function(error) {
// Handle Errors here.
var errorCode = error.code;
var errorMessage = error.message;
// The email of the user's account used.
var email = error.email;
// The firebase.auth.AuthCredential type that was used.
var credential = error.credential;
console.log(errorCode);
});
file://
加载文件时无法工作。您需要从一个适当的 Web 服务器加载 HTML 才能使其正常工作。 - Frank van Puffelen