Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

Draft: fix: remove Mail account on SSO logout

Fahim M. Choudhury requested to merge 3485-remove-mail-account-on-sso-log-out into main

Description

When logging out from AccountManager using SSO, the associated Mail account was not being removed whereas for non-SSO it was being removed as expected.

The 'AccountManager.KEY_ACCOUNT_NAME' intent extra contains the username part of the email address (e.g., 'username' from username@example.com).

For non-SSO accounts, accountName and email used to be the same. However, for SSO accounts, the accountName contains only the username part of the email address.

This commit updates the logic to find the matching account by comparing this username with the username part of the account's email address. Previously, it attempted to match the full email address with just the username, which would always fail.

Screenshots

Technical details

Tests

Issues

https://gitlab.e.foundation/e/os/backlog/-/issues/3485

10 commandments of code review

👪 ❤️ https://gitlab.e.foundation/groups/e/-/wikis/contribute/development-processes/code-review-guidelines

Summary by CodeRabbit

  • Refactor
    • Enhanced account synchronization by matching only the prefix of email addresses, improving account identification flexibility.
Edited by CodeRabbitAI

Merge request reports

Loading