fix: remove conflicting broad scheme from MainActivity to prevent Android disambiguation dialog#1514
Merged
subhankarmaiti merged 1 commit intomasterfrom Apr 22, 2026
Conversation
pmathew92
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
customSchemein the Auth0 plugin config matches the app's Exposcheme(e.g., both set to"smtest"), Android shows a chooser dialog during the Auth0 login callback because bothMainActivity(broad scheme handler added by@expo/config-plugins) andRedirectActivity(specific Auth0 callback handler) are registered for the same URL schemeaddAndroidAuth0Manifest) now removes conflicting broad scheme data elements (same scheme, noandroid:host) from other activities before adding the Auth0-specific intent filter toRedirectActivity, mirroring the existing iOS deduplication logic inaddIOSAuth0ConfigInInfoPListandroid:hostare preserved since they won't cause disambiguationRoot Cause
Expo's
@expo/config-pluginsadds<data android:scheme="smtest"/>toMainActivityfor deep linking. The react-native-auth0 plugin then adds<data android:scheme="smtest" android:host="..." android:pathPrefix="..."/>toRedirectActivity. When Chrome Custom Tab redirects back after authentication, it finds two exported activities matching the scheme and shows a disambiguation dialog. iOS already handles this via dedup inaddIOSAuth0ConfigInInfoPList. Android was missing the equivalent.Test plan
MainActivityandroid:host(specific match) is preservedexp+<scheme>deep links still work in dev mode