Skip to content

[Feat] Implement removeAccount() and logoutAll() in AccountContext - #46

Merged
maneesha-xyz merged 1 commit into
OpenGovMail:mainfrom
saknarajapakshe:36-feat-remove-account-logout-all
Jul 17, 2026
Merged

[Feat] Implement removeAccount() and logoutAll() in AccountContext#46
maneesha-xyz merged 1 commit into
OpenGovMail:mainfrom
saknarajapakshe:36-feat-remove-account-logout-all

Conversation

@saknarajapakshe

@saknarajapakshe saknarajapakshe commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds removeAccount(id) and logoutAll() to AccountContext.

  • removeAccount(id) logs out that account's session, clears its cached mail, and removes it from storage permanently. If you removed the active account, it switches to another linked account if there is one; otherwise, it clears the active account.
  • logoutAll() logs out every linked account's session at once but keeps them in the accounts list so they can be re-login again with credentials, without registering account from the beginning.

No UI hooked up to these yet, that's coming in #37 and #39.

Closes #36

@saknarajapakshe
saknarajapakshe force-pushed the 36-feat-remove-account-logout-all branch from bcf4c5b to 90faab4 Compare July 13, 2026 05:32
@saknarajapakshe
saknarajapakshe force-pushed the 36-feat-remove-account-logout-all branch 4 times, most recently from 067a5bc to 17fbdbe Compare July 15, 2026 06:59
@saknarajapakshe saknarajapakshe changed the title Implement removeAccount() and logoutAll() in AccountContext [Feat] Implement removeAccount() and logoutAll() in AccountContext Jul 15, 2026
@saknarajapakshe
saknarajapakshe marked this pull request as draft July 15, 2026 12:27
@Aravinda-HWK
Aravinda-HWK self-requested a review July 15, 2026 16:46
@saknarajapakshe
saknarajapakshe marked this pull request as ready for review July 15, 2026 16:51
Comment thread src/nonview/core/AccountContext.tsx Outdated
@saknarajapakshe
saknarajapakshe force-pushed the 36-feat-remove-account-logout-all branch 2 times, most recently from 04f6194 to 0a3dc81 Compare July 16, 2026 12:11
@saknarajapakshe
saknarajapakshe force-pushed the 36-feat-remove-account-logout-all branch from 0a3dc81 to a5dceb3 Compare July 16, 2026 12:16
@saknarajapakshe
saknarajapakshe force-pushed the 36-feat-remove-account-logout-all branch from 4800c8e to dc638fa Compare July 17, 2026 04:09
@saknarajapakshe
saknarajapakshe force-pushed the 36-feat-remove-account-logout-all branch from dc638fa to 7bf95d7 Compare July 17, 2026 04:09
@maneesha-xyz

Copy link
Copy Markdown
Collaborator

LGTM.

@maneesha-xyz
maneesha-xyz merged commit 972a1ff into OpenGovMail:main Jul 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement removeAccount() and logoutAll() in AccountContext

3 participants