var user = null;
this.showLoginDialogGoogle = function(){
var ref = new Firebase("https://googlelogin1.firebaseio.com");
ref.authWithOAuthPopup("google", function(error, authData) {
if (error) {
console.log("Login Failed!", error);
} else {
console.log("Authenticated successfully with payload:", authData);
user = authData;
This.goToPage('/profile');
$rootScope.flag=true;
$rootScope.$digest();
}
});
};
我已经使用 firebase google 身份验证对用户进行了身份验证。问题是当我刷新页面时,我的会话过期并authData
变为null
. 我该怎么做才能在刷新页面后authData
保留身份验证时获得的数据?