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

Skip to content

fix: preserve sync settings on re-auth for OAuth accounts

Fahim M. Choudhury requested to merge 3535-preserve-sync-on-reauth into main

Description

The re-authentication flow for OAuth accounts used to reset every sync settings and start with defaults. This commit fixes the behaviour so that on re-auth, the settings are preserved.

It uses the same flow for Murena account's SSO migration as the settings are saved too during the migration.

For more details, see this MR: !165 (merged)

Screenshots

Screenshot_20250821_143730_foundation.e.accountmanager Screenshot_20250821_144034_foundation.e.accountmanager

Tests

  1. Log in to Google, Yahoo or SSO-enabled Murena account.
  2. Disable one or more sync settings in Account Settings screen.
  3. Change one or more intervals value and contact group method in Account sync screen.
  4. Perform a re-authentication from Account sync screen.
  5. Observe that sync settings are preserved.
  6. Observe that sync interval and contact group methods are preserved.
  7. Observe that after a reboot, the sync settings are preserved.

Issues

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

10 commandments of code review

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

Summary by CodeRabbit

  • New Features
    • Clearer account setup/upsert flow that explicitly handles Basic Authentication alongside OAuth/OpenID, simplifying create/update behavior.
  • Bug Fixes
    • More reliable detection and handling of OAuth vs BasicAuth accounts to avoid auth-state mistakes.
    • Consistent migration and sync configuration when updating accounts, reducing setup and sync errors.
Edited by CodeRabbitAI

Merge request reports

Loading