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 authentication でユーザーを認証しました。問題は、ページを更新すると、セッションが期限切れにauthData
なり、 null
. authData
ページを更新した後、認証時に取得したデータを保持するにはどうすればよいですか?