Support for multiple Auth0 tenants
See original GitHub issueBefore version 2.9, we were able to add support for multiple tenants (for example, we have a dev tenant and a prod tenant) by simply adding multiple <data/>
tags to the intent filter, one for each auth0 domain we use.
With the updates in version 2.9, we can only specify one Auth0 domain. We can swap between Auth0 domains between doing production builds and dev builds, but in our use case, our team needs to be able to swap between dev & prod servers at runtime (which worked with multiple data tags).
Don’t know enough about Android/Gradle to know the limitations of manifestPlaceholders, but it doesn’t seem like having list-type placeholders that generate tags would be possible. Another solution would be to have option to specify the intent filter in the user’s AndroidManifest, like how it was done pre-v2.9 (not sure if there’s already a way to override the react-native-auth0’s AndroidManifest)
Was able to get around this by adding multiple <data>
tags to the intent filter inside of node_modules/react-native-auth0, and add corresponding manifestPlaceholders (e.g. auth0Domain_prod and auth0Domain_dev) but obviously this is not a real solution.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:7 (1 by maintainers)
Top GitHub Comments
@Widcket adding an activity with
tools:node="replace"
seemed to work! thanks!! for the sake of writing out a solution on this thread, I added this to my AndroidManifest:(which is identical to the
<activity/>
tag in the package manifest, with the exception of explicitly defining multiple domains and adding thetools:node="replace"
) and remember to addxmlns:tools="http://schemas.android.com/tools"
to the topmost<manifest/>
tagThis is completely blocking our team from upgrading as well.