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

Sign out only the current user #2302

Closed
BasThomas opened this issue Oct 16, 2018 · 3 comments
Closed

Sign out only the current user #2302

BasThomas opened this issue Oct 16, 2018 · 3 comments
Labels
🆕 feature request A feature being requested to be added, not yet approved

Comments

@BasThomas
Copy link
Collaborator

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)"
}
@BasThomas BasThomas added the 🆕 feature request A feature being requested to be added, not yet approved label Oct 16, 2018
@j-f1
Copy link

j-f1 commented Oct 16, 2018

How about swiping left on the accounts to log them out using a similar UI to swipe-to-delete elsewhere on iOS?

@BasThomas
Copy link
Collaborator Author

BasThomas commented Oct 16, 2018

That's another option, but would make it harder to find how to logout, which I'm not sure is a tradeoff we should want to make.

@Huddie
Copy link
Collaborator

Huddie commented Oct 16, 2018

I think @j-f1 suggestion is fine. We can have logout where it currently is as a universal logout (logout of app) and the under accounts you can logout of individual accounts. If you logout of all accounts in the accounts page, it auto logs out of the app

Sent with GitHawk

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
🆕 feature request A feature being requested to be added, not yet approved
Projects
None yet
Development

No branches or pull requests

4 participants