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
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...
The text was updated successfully, but these errors were encountered:
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...
The text was updated successfully, but these errors were encountered: