Modern Apps git

← Modern-Apps.git

email: fix Azure OAuth redirect intent-filter (remove invalid host="")

Commit
84630bf7807300b2b271ed92108cae5f526c0937
Author
Vayun Mathur <[email protected]>
When
2026-08-02 19:42 UTC (4 months ago)
Parents
5ae801f
Second intent-filter with android:host="" + path="/oauth" is invalid on Android 12+ (empty host not allowed) and breaks resolution of com.vayunmathur.email://oauth. Browser closes but OAuthActivity never receives redirect -> Microsoft sign in failed.

Keep only RFC8252 compliant filter scheme=com.vayunmathur.email host=oauth. Azure already correctly has com.vayunmathur.email://oauth (com.vayunmathur.com://oauth in bug report was typo).

Diff

email/src/main/AndroidManifest.xml
diff --git a/email/src/main/AndroidManifest.xml b/email/src/main/AndroidManifest.xmlindex 61bbfe1761..6eafd2bc48 100644--- a/email/src/main/AndroidManifest.xml+++ b/email/src/main/AndroidManifest.xml@@ -112,7 +112,9 @@          <!-- Microsoft OAuth redirect handler. Azure app registered as Mobile & Desktop              with redirect com.vayunmathur.email://oauth per RFC8252 compliant native pattern.-             Thunderbird Desktop uses useExternalBrowser=true + custom scheme same as this. -->+             Thunderbird Desktop uses useExternalBrowser=true + custom scheme same as this.+             Single filter only — second filter with host=\"\" was invalid on Android 12+ (AOSP disallows empty host)+             and prevented intent resolution for com.vayunmathur.email://oauth. -->         <activity             android:name=".ui.OAuthActivity"             android:exported="true"@@ -124,13 +126,6 @@                 <category android:name="android.intent.category.BROWSABLE" />                 <data android:scheme="com.vayunmathur.email" android:host="oauth" />             </intent-filter>-            <intent-filter>-                <action android:name="android.intent.action.VIEW" />-                <category android:name="android.intent.category.DEFAULT" />-                <category android:name="android.intent.category.BROWSABLE" />-                <!-- Also accept explicit path /oauth for some OEM parsers -->-                <data android:scheme="com.vayunmathur.email" android:host="" android:path="/oauth" />-            </intent-filter>         </activity>          <activity