Skip to content

fix(email): hide OAuth storage fields from config responses#5651

Merged
o3LL merged 1 commit into
odysseus-dev:devfrom
RaresKeY:fix/email-config-hide-oauth-tokens
Jul 22, 2026
Merged

fix(email): hide OAuth storage fields from config responses#5651
o3LL merged 1 commit into
odysseus-dev:devfrom
RaresKeY:fix/email-config-hide-oauth-tokens

Conversation

@RaresKeY

@RaresKeY RaresKeY commented Jul 20, 2026

Copy link
Copy Markdown
Member

Summary

Remove encrypted Google OAuth access-token, refresh-token, and expiry storage fields from the browser-facing legacy email configuration response. The route still returns the provider status and ordinary account settings needed by the UI, matching the existing account-list response boundary.

The internal transport helper remains unchanged and can continue supplying OAuth fields to server-side IMAP/SMTP callers.

Target branch

  • This PR targets dev, not main.

Linked Issue

Fixes #5639

Part of #5637

Type of Change

  • Bug fix (non-breaking — fixes a confirmed issue)
  • New feature (non-breaking — adds new behaviour)
  • Breaking change (changes or removes existing behaviour)
  • Refactor / cleanup (behaviour unchanged)
  • Documentation only
  • CI / tooling / configuration

Checklist

  • I searched open issues and open PRs — this response-serialization bug is not already tracked.
  • This PR targets dev.
  • My changes are limited to the client response boundary and focused regression coverage.
  • I ran the app end-to-end. This backend serialization fix was validated with the live route function and adjacent email tests in an isolated environment with mocked provider/network I/O.

How to Test

  1. Run:

    python -m pytest -q tests/test_email_oauth.py tests/test_email_owner_scope.py
  2. Configure a Google email account and request GET /api/email/config.

  3. Verify the response still contains oauth_provider: "google" but does not contain oauth_access_token, oauth_refresh_token, or oauth_token_expiry.

  4. Verify password masking and ordinary email preferences are unchanged.

Current-dev isolated validation passes 146 adjacent tests. Python compilation and diff checks pass.

Visual / UI changes

N/A — backend response serialization and tests only; no UI rendering changed.

Screenshots / clips

N/A — no visual changes.

@github-actions github-actions Bot added the ready for review Description complete — ready for maintainer review label Jul 20, 2026
@RaresKeY
RaresKeY marked this pull request as ready for review July 21, 2026 12:20
@RaresKeY RaresKeY added the bug Something isn't working label Jul 21, 2026

@o3LL o3LL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, minimal, and complete! Approved

@o3LL
o3LL merged commit bcd5596 into odysseus-dev:dev Jul 22, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready for review Description complete — ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

email: hide OAuth storage fields from browser config responses

2 participants