Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Sign out only the current user #2302

Closed
Closed
@BasThomas

Description

@BasThomas

Describe the solution you'd like
When you sign out, all user sessions are removed. It would be nice if it would only logout the current user session.

Describe alternatives you've considered
Leave it as-is.

Additional context
I didn't look at the implementation and wanted to make the button more user friendly by including the user that would be logged out... then I found out we log out all users (and we warn we do).

All I added for now was the following in SettingsViewController's viewDidLoad():

if sessionManager.userSessions.count > 1 {
    guard let userSession = sessionManager.focusedUserSession else {
        // If this won't be hit, it can be replaced with a force unwrapped
        // focused user session or a `fatalError` instead.
        return assertionFailure("Expected to have a focused user session")
    }
    signOutCell.textLabel?.text = "\(Constants.Strings.signout) \(userSession.username)"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    🆕 feature requestA feature being requested to be added, not yet approved

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions