Skip to content

Logout does not remove online user in Firebase!  #6

@hughred22

Description

@hughred22

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions