You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Logout does not remove online user in Firebase! #6
Your logout code has problem. You are missing the value to pass in $getRecord(). I change the code into follow:
if (onlineUsers) {
var presenceId = UserFactory.getPresenceId();
console.log ("presenceId is " + presenceId);
var user = onlineUsers.$getRecord(presenceId);
console.log ("User is " + user);
onlineUsers.$remove(user);
}
And it remove the user from online user list. But we still have a BIG ISSUE: What if user session expire? It will kick the user out but it will not delete the online user.
I want to know how you use $onAuth to deal with session expire issue. Basically I want to figure out all the best practices to deal with user login, logout, and session management with Firebase and Ionic...
Activity
arvindr21 commentedon Sep 18, 2015
Take a look at: https://www.firebase.com/docs/web/libraries/angular/guide/user-auth.html#section-auth-state for session state detection.