The onboarding decision in #9 makes Gmail authenticate via an app password + preconfigured
IMAP/SMTP, not OAuth. That leaves the Gmail OAuth implementation unused and unreachable:
nothing constructs an AuthType.OAUTH_GMAIL account (there is no addGmailAccount path and
no UI for it), so GmailAuthManager and the OAUTH_GMAIL branch can never run. This ticket
removes that dead code so the codebase matches the actual auth model.
Outlook keeps using OAuth via AppAuth — only the Gmail-specific OAuth path is removed.
Scope
Delete auth/GmailAuthManager.kt. Keep the shared OAuthResult / FreshToken types —
the Outlook manager uses them.
Remove AuthType.OAUTH_GMAIL from domain/model/Account.kt and update every exhaustive when over AuthType. Confirm no persisted account rows use it (none can be created) and
the Room authType mapper still round-trips.
In data/sync/MailConnectionFactory.kt: drop the gmailAuthManager injection, the AuthType.OAUTH_GMAIL -> branch in resolveSecret, and the SCOPE_GMAIL constant.
Optionally simplify the useXoauth2 = authType != PASSWORD_IMAP logic now that Outlook is
the only OAuth type.
In app/build.gradle.kts: remove gmailOAuthClientId, the GMAIL_OAUTH_CLIENT_ID and GMAIL_OAUTH_REDIRECT_URI BuildConfig fields, and the gmailRedirectScheme val.
AppAuth manifest placeholder — handle with care. manifestPlaceholders["appAuthRedirectScheme"] currently points at the Gmail scheme.
AppAuth's bundled manifest requires this placeholder (manifest merge fails without it),
so don't just delete it — repoint it to the Outlook scheme (org.libremail.outlook) or
otherwise satisfy AppAuth, then re-verify the merged manifest. Update the explanatory
comment on the RedirectUriReceiverActivity block in AndroidManifest.xml.
Remove GMAIL_OAUTH_CLIENT_ID from secrets.properties.example.
README Gmail-OAuth text is owned by #20 (whole README) / #31 (onboarding) — coordinate,
don't duplicate the doc change here.
Acceptance criteria
No Gmail-OAuth references remain in code/build config (GmailAuthManager, OAUTH_GMAIL, GMAIL_OAUTH_*, SCOPE_GMAIL, gmailRedirectScheme).
Outlook sign-in still works end-to-end (AppAuth redirect intact). This area has been
fragile before (the AppCompat-theme redirect crash fix), so verify the merged manifest and a
real Outlook login.
Follows the Gmail decision in #9 — can proceed independently now, since the path is already
unreachable. Coordinate the README with #20 / #31. Verify against the existing Outlook OAuth flow.
## Context
The onboarding decision in #9 makes Gmail authenticate via an **app password + preconfigured
IMAP/SMTP, not OAuth**. That leaves the Gmail OAuth implementation unused and unreachable:
nothing constructs an `AuthType.OAUTH_GMAIL` account (there is no `addGmailAccount` path and
no UI for it), so `GmailAuthManager` and the `OAUTH_GMAIL` branch can never run. This ticket
removes that dead code so the codebase matches the actual auth model.
**Outlook keeps using OAuth via AppAuth** — only the Gmail-specific OAuth path is removed.
## Scope
- [ ] Delete `auth/GmailAuthManager.kt`. Keep the shared `OAuthResult` / `FreshToken` types —
the Outlook manager uses them.
- [ ] Remove `AuthType.OAUTH_GMAIL` from `domain/model/Account.kt` and update every exhaustive
`when` over `AuthType`. Confirm no persisted account rows use it (none can be created) and
the Room `authType` mapper still round-trips.
- [ ] In `data/sync/MailConnectionFactory.kt`: drop the `gmailAuthManager` injection, the
`AuthType.OAUTH_GMAIL ->` branch in `resolveSecret`, and the `SCOPE_GMAIL` constant.
Optionally simplify the `useXoauth2 = authType != PASSWORD_IMAP` logic now that Outlook is
the only OAuth type.
- [ ] In `app/build.gradle.kts`: remove `gmailOAuthClientId`, the `GMAIL_OAUTH_CLIENT_ID` and
`GMAIL_OAUTH_REDIRECT_URI` BuildConfig fields, and the `gmailRedirectScheme` val.
- [ ] **AppAuth manifest placeholder — handle with care.**
`manifestPlaceholders["appAuthRedirectScheme"]` currently points at the Gmail scheme.
AppAuth's bundled manifest *requires* this placeholder (manifest merge fails without it),
so don't just delete it — repoint it to the Outlook scheme (`org.libremail.outlook`) or
otherwise satisfy AppAuth, then re-verify the merged manifest. Update the explanatory
comment on the `RedirectUriReceiverActivity` block in `AndroidManifest.xml`.
- [ ] Remove `GMAIL_OAUTH_CLIENT_ID` from `secrets.properties.example`.
- [ ] README Gmail-OAuth text is owned by #20 (whole README) / #31 (onboarding) — coordinate,
don't duplicate the doc change here.
## Acceptance criteria
- No Gmail-OAuth references remain in code/build config (`GmailAuthManager`, `OAUTH_GMAIL`,
`GMAIL_OAUTH_*`, `SCOPE_GMAIL`, `gmailRedirectScheme`).
- `:app:assembleDebug` + `:app:testDebugUnitTest` + `:app:lintDebug` pass.
- **Outlook sign-in still works end-to-end** (AppAuth redirect intact). This area has been
fragile before (the AppCompat-theme redirect crash fix), so verify the merged manifest and a
real Outlook login.
## Relevant files
- `auth/GmailAuthManager.kt` (delete), `domain/model/Account.kt`,
`data/sync/MailConnectionFactory.kt`, `app/build.gradle.kts`,
`app/src/main/AndroidManifest.xml`, `secrets.properties.example`
## Dependencies
Follows the Gmail decision in #9 — can proceed independently now, since the path is already
unreachable. Coordinate the README with #20 / #31. Verify against the existing Outlook OAuth flow.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Context
The onboarding decision in #9 makes Gmail authenticate via an app password + preconfigured
IMAP/SMTP, not OAuth. That leaves the Gmail OAuth implementation unused and unreachable:
nothing constructs an
AuthType.OAUTH_GMAILaccount (there is noaddGmailAccountpath andno UI for it), so
GmailAuthManagerand theOAUTH_GMAILbranch can never run. This ticketremoves that dead code so the codebase matches the actual auth model.
Outlook keeps using OAuth via AppAuth — only the Gmail-specific OAuth path is removed.
Scope
auth/GmailAuthManager.kt. Keep the sharedOAuthResult/FreshTokentypes —the Outlook manager uses them.
AuthType.OAUTH_GMAILfromdomain/model/Account.ktand update every exhaustivewhenoverAuthType. Confirm no persisted account rows use it (none can be created) andthe Room
authTypemapper still round-trips.data/sync/MailConnectionFactory.kt: drop thegmailAuthManagerinjection, theAuthType.OAUTH_GMAIL ->branch inresolveSecret, and theSCOPE_GMAILconstant.Optionally simplify the
useXoauth2 = authType != PASSWORD_IMAPlogic now that Outlook isthe only OAuth type.
app/build.gradle.kts: removegmailOAuthClientId, theGMAIL_OAUTH_CLIENT_IDandGMAIL_OAUTH_REDIRECT_URIBuildConfig fields, and thegmailRedirectSchemeval.manifestPlaceholders["appAuthRedirectScheme"]currently points at the Gmail scheme.AppAuth's bundled manifest requires this placeholder (manifest merge fails without it),
so don't just delete it — repoint it to the Outlook scheme (
org.libremail.outlook) orotherwise satisfy AppAuth, then re-verify the merged manifest. Update the explanatory
comment on the
RedirectUriReceiverActivityblock inAndroidManifest.xml.GMAIL_OAUTH_CLIENT_IDfromsecrets.properties.example.don't duplicate the doc change here.
Acceptance criteria
GmailAuthManager,OAUTH_GMAIL,GMAIL_OAUTH_*,SCOPE_GMAIL,gmailRedirectScheme).:app:assembleDebug+:app:testDebugUnitTest+:app:lintDebugpass.fragile before (the AppCompat-theme redirect crash fix), so verify the merged manifest and a
real Outlook login.
Relevant files
auth/GmailAuthManager.kt(delete),domain/model/Account.kt,data/sync/MailConnectionFactory.kt,app/build.gradle.kts,app/src/main/AndroidManifest.xml,secrets.properties.exampleDependencies
Follows the Gmail decision in #9 — can proceed independently now, since the path is already
unreachable. Coordinate the README with #20 / #31. Verify against the existing Outlook OAuth flow.