Skip to content

Implement removeAccount() and logoutAll() in AccountContext #36

Description

@saknarajapakshe

What to build

Real implementations for removeAccount(id) and logoutAll() in AccountContext.tsx (both currently just throw).

  • removeAccount(id): sign out that account's session, clear its cached mail (clearAccount, already exists), and remove it from storage. If it was the account you were viewing, switch to another linked account if one exists, otherwise land on the login screen.
  • logoutAll(): sign out of every account's session, but keep the accounts themselves linked — signing back in shouldn't require re-registering.

Done when

  • Removing your only account clears its cached mail and logs you out.
  • Removing your current account falls back to another linked one cleanly, with no stale data flash.
  • Signing out of all accounts keeps them all linked — you can sign back in without re-registering.

Depends on

Nothing beyond #28 — start any time, doesn't need any UI to exist yet.

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