CustomTabs shows ERR_UNKNOWN_URL_SCHEME after 302 Redirect

Viewed 4305

I'm trying to implement OAuth2 login flow using Custom Tabs, but after login has been successful a 302 Redirect is retrieved with url as the following: "my.app:/oauth2/code?xxx".

Now I have declared redirect URI in AndroidManifest to listen to this, but ERR_UNKNOWN_URL_SCHEME is seen :/

<intent-filter>
            <data
                android:host="oauth2"
                android:scheme="my.app"
                android:pathPrefix="/code"
            />

            <action android:name="android.intent.action.VIEW" />

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

I've tried different url-schemes to listen to, but none seems to be triggered to open my app.

1 Answers
Related