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

Unverified Commit 9f7d32d2 authored by Wolf-Martell Montwé's avatar Wolf-Martell Montwé Committed by GitHub
Browse files

Merge pull request #9879 from wmontwe/feat-oauth-update-tb-beta-gmail-config

feat(oauth): change TB beta gmail config to updated client id
parents 3b78eb25 dd0b081c
Loading
Loading
Loading
Loading
+0 −39
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!-- TODO remove once OAuth ids have been moved from TBD to TBA -->
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:installLocation="auto"
    >

    <application>
        <activity
            android:name="net.openid.appauth.RedirectUriReceiverActivity"
            android:exported="true"
            >

            <!-- The library's default intent filter with `appAuthRedirectScheme` replaced by `applicationId` -->
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data android:scheme="${applicationId}" />
                <data android:scheme="${applicationId}.mobile" />
            </intent-filter>

            <!-- Microsoft uses a special redirect URI format for Android apps -->
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data
                    android:host="${applicationId}"
                    android:scheme="msauth"
                    />
            </intent-filter>
        </activity>

    </application>
</manifest>
+2 −3
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@ class TbOAuthConfigurationFactory : OAuthConfigurationFactory {
        )
    }

    // TODO: Update clientId and redirectUri once new client ID is available
    private fun createGmailConfiguration(): Pair<List<String>, OAuthConfiguration> {
        return listOf(
            "imap.gmail.com",
@@ -52,11 +51,11 @@ class TbOAuthConfigurationFactory : OAuthConfigurationFactory {
            "smtp.gmail.com",
            "smtp.googlemail.com",
        ) to OAuthConfiguration(
            clientId = "560629489500-rvmv3suifbrl1888pl6ppulog8krnlcp.apps.googleusercontent.com",
            clientId = "560629489500-u95g9r3m604k2f1uqb5c7mo27coj8g9i.apps.googleusercontent.com",
            scopes = listOf("https://mail.google.com/"),
            authorizationEndpoint = "https://accounts.google.com/o/oauth2/v2/auth",
            tokenEndpoint = "https://oauth2.googleapis.com/token",
            redirectUri = "${BuildConfig.APPLICATION_ID}.mobile:/oauth2redirect",
            redirectUri = "${BuildConfig.APPLICATION_ID}:/oauth2redirect",
        )
    }