我的最新文件,特别是我的JS文件,没有反映在Firebase在Chrome上部署的文件中(我在Safari上没有这个问题)。我按照说明listed here
在Chrome上,我直接转到my file并执行了“硬重新加载”和“空缓存和硬重新加载”,但此更改从未反映过。
基本上,Firebase正在使用此版本的app.js:
function.googleSignin(){
var provider = new firebase.auth.GoogleAuthProvider();
firebase.auth().signInWithRedirect(provider);
}
firebase.auth().getRedirectResult().then(function(result) {
// This gives you a Google Access Token. You can use it to access the Google API.
var token = result.credential.accessToken;
var user = result.user;
}).catch(function(error) {
var errorCode = error.code;
var errorMessage = error.message;
var email = error.email;
var credential = error.credential;
});
但我的本地版本是:
function googleSignin(){
var provider = new firebase.auth.GoogleAuthProvider();
firebase.auth().signInWithRedirect(provider);
}
firebase.auth().getRedirectResult().then(function(result) {
// This gives you a Google Access Token. You can use it to access the Google API.
var token = result.credential.accessToken;
var user = result.user;
}).catch(function(error) {
var errorCode = error.code;
var errorMessage = error.message;
var email = error.email;
var credential = error.credential;
});
如果您想检查我的项目,GitHub链接为here。