AppAuth-Android
AppAuth-Android copied to clipboard
Custom scheme deeplink doesn't seem to work
HI team,
A very few of my users are experiencing issues on Android, where the custom scheme deeplink doesn't seem to work, upon registration completion.
Checklist:
- [X] I am using the latest release
- [X] I searched for existing GitHub issues
- [X] I read the documentation
- [X] I verified the client configuration matches the information in the identity provider (or I am using dynamic client registration)
- [X] I am either using a custom URI scheme or ~~
httpswith App Links~~ for client redirect. - [ ] I can reproduce the issue in the demo app (optional)
Configuration (of one of my user experiencing this issue)
- Version: 0.11.1
- Integration: ReactNative using this library
- Identity provider: KeyCloack
Android details
Version: 10 Vendor: Samsung Model: SM-G960F
Issue Description
Upon identity operation completion, the user would see the webview stuck on the custom scheme, marked as non-handle. The user tried to re-install the app numerous times and clear all data from it, without any success.

Here is a snippet of my AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mypackage">
<application
android:name=".MainApplication"
... >
...
<activity
android:name="net.openid.appauth.RedirectUriReceiverActivity"
android:exported="true">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:scheme="https"
android:host="app.mydomain.com"
android:pathPrefix="/auth/" />
<data
android:scheme="https"
android:host="app.myotherdomain.com"
android:pathPrefix="/auth/" />
</intent-filter>
<intent-filter>
<data android:scheme="com.mypackage.auth"/>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
</intent-filter>
</activity>
</application>
</manifest>
Perhaps I need a specific deeplink configuration for some vendors? Or maybe I forgot something obvious? Worth to mention again, it works on most of the device, starting from Android 8. Could it be specific browser capabilities?
Looks like the user is using Chrome Custom Tab but it's unable to open the custom URL scheme. Since this is a core Android feature I doubt there are any issues with the OS flavour.
Guessing here that your manifest might not be as expected post manifest-merge. You are missing a tools:node="replace".
Hi @agologan and thanks for taking the time to look into my issue.
I'm not quite sure what you mean with this missing tools:node="replace", would you mind sharing a small example? Also, you mentioned this would be related to a Android Core feature, but why would this not be reproducible/fine for most of my users?
My original thought was that the user may use something else than Chrome as a default browser, which would not support well deeplinks. Could there be a way to force the user to use the system default browser tab?
The screenshot you are showing looks to be Chrome, thought it may be a fork in which case somebody would've intentionally broken the functionality, so doubtful imho.
tools:node=replace on the RedirectUriReceiverActivity