refactor(auth): remove dead Gmail OAuth code path
Gmail authenticates via app password + preconfigured IMAP/SMTP (decision in #9), never OAuth, so the Gmail-OAuth implementation was unreachable dead code. Remove it while keeping Outlook's AppAuth OAuth path intact. - Delete auth/GmailAuthManager.kt (shared OAuthResult/FreshToken kept). - Drop AuthType.OAUTH_GMAIL and its exhaustive `when` branch, the gmailAuthManager injection, and the SCOPE_GMAIL constant in MailConnectionFactory. - Remove GMAIL_OAUTH_* BuildConfig fields, gmailOAuthClientId, and the gmailRedirectScheme val from app/build.gradle.kts. - Repoint the AppAuth manifestPlaceholders["appAuthRedirectScheme"] to the Outlook scheme (org.libremail.outlook). AppAuth's bundled manifest now registers that scheme on RedirectUriReceiverActivity, so the app manifest's now-redundant Outlook intent-filter is removed; the AppCompat theme override (crash fix) is preserved. Verified the merged manifest. - Drop GMAIL_OAUTH_CLIENT_ID from secrets.properties.example. authType persists as the enum name in a TEXT column, so removing a constant needs no Room schema change or migration. Closes #39 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
# Copy this file to `secrets.properties` (which is git-ignored) and fill in the value.
|
||||
# Copy this file to `secrets.properties` (which is git-ignored) and fill in the values you need.
|
||||
# Every value below is optional — the build works with the defaults when this file is absent.
|
||||
#
|
||||
# Gmail OAuth 2.0 *Android* client ID created in Google Cloud Console.
|
||||
# See the README ("Gmail account setup") for the exact steps. Used by the app for
|
||||
# the Authorization Code + PKCE login flow; no client secret is required for an
|
||||
# installed Android app.
|
||||
GMAIL_OAUTH_CLIENT_ID=
|
||||
|
||||
# Optional: Microsoft (Outlook) OAuth public client id. A working default ships with the build;
|
||||
# set this only to use your own Azure app registration.
|
||||
#OUTLOOK_OAUTH_CLIENT_ID=
|
||||
|
||||
Reference in New Issue
Block a user