【发布时间】:2015-11-04 07:22:45
【问题描述】:
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 保留在身份验证时获得的数据?
【问题讨论】:
标签: angularjs firebasesimplelogin firebase-authentication