Skip to content

fix: android intent-filter generation for packages with uppercase letters#1346

Merged
subhankarmaiti merged 2 commits into
masterfrom
fix/android-uppercase-package-name-intent-filter
Oct 16, 2025
Merged

fix: android intent-filter generation for packages with uppercase letters#1346
subhankarmaiti merged 2 commits into
masterfrom
fix/android-uppercase-package-name-intent-filter

Conversation

@subhankarmaiti

@subhankarmaiti subhankarmaiti commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

When an Android application package name contains uppercase letters (e.g., com.testApp), the auto-generated intent-filter in the AndroidManifest file uses the original casing in the pathPrefix attribute. However, the callback URI generation already lowercases the bundle identifier, causing a mismatch that prevents the app from properly handling the Auth0 callback after authentication.

Solution

This PR lowercases the applicationId in the Expo config plugin before using it to generate the Android intent-filter, ensuring consistency with the callback URI generation logic.

Changed:

  • src/plugin/withAuth0.ts: Modified withAndroidAuth0Manifest to lowercase the package name via config.android?.package?.toLowerCase()

This aligns with the existing behavior in NativeWebAuthProvider.ts where the bundleId is lowercased when generating callback URIs.

Impact

  • Developers using package names with uppercase letters will no longer need to manually modify their AndroidManifest.xml
  • The intent-filter's pathPrefix will now consistently use lowercase package names, matching the callback URL structure
  • No breaking changes for existing apps with lowercase package names

Testing

  • Verify that apps with uppercase package names (e.g., com.testApp) can successfully authenticate and receive callbacks
  • Confirm existing apps with lowercase package names continue to work as expected
  • Test with custom schemes to ensure compatibility

References

@subhankarmaiti subhankarmaiti requested a review from a team as a code owner October 16, 2025 09:43
pmathew92
pmathew92 previously approved these changes Oct 16, 2025
@subhankarmaiti subhankarmaiti merged commit 38435a1 into master Oct 16, 2025
4 checks passed
@subhankarmaiti subhankarmaiti deleted the fix/android-uppercase-package-name-intent-filter branch October 16, 2025 10:14
hugoecken pushed a commit to hugoecken/react-native-auth0 that referenced this pull request Oct 29, 2025
hugoecken pushed a commit to hugoecken/react-native-auth0 that referenced this pull request Oct 29, 2025
@subhankarmaiti subhankarmaiti mentioned this pull request Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants