BSK
May 13, 2024, 9:37am
1
I have a mobile React Native android application with an environment picker in the dev menu which allows me to change environments to dev, sit, uat and prod. We also want to have a separate tenant for each of these environments. I was wondering if it is possible to change tenants at runtime based on the environment I have selected from a environment picker?
tyf
May 14, 2024, 12:23am
3
Hey there @BSK !
While not officially supported OOB, the following discussion may be helpful:
opened 07:36AM - 18 Feb 20 UTC
closed 12:49PM - 02 Mar 20 UTC
### Description
This is more of a question than a bug/feature request. However,… I would consider this an issue related to this library.
As described in the Readme you have to specify the auth0 tenant domain in the `AndroidManifest.xml` like:
```
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="YOUR_AUTH0_DOMAIN"
android:pathPrefix="/android/${applicationId}/callback"
android:scheme="${applicationId}" />
</intent-filter>
```
We are building a multi-tenant mobile app. Since each of our tenants have a different URL we need a way to dynamically change the value of `YOUR_AUTH0_DOMAIN`. According to the [Android documentation](https://developer.android.com/guide/topics/manifest/data-element) it is possible to use wildcards inside `android:host` such as `*.mydomain.com`. I did't try this yet but it should work if all my tenants would use different subdomains under the same top-level-domain. This might be an ok solution for production environments but that would also mean that I have to pay for every other environment (dev and staging) to use the custom domain feature on auth0.
So my question is, if it is possible to build a multi tenant app on Android with this package?
### Prerequisites
- [x] Did you check the documentation? [Add a link]
- [x] Did you check the [Auth0 Community](https://community.auth0.com/)?
- [x] Are you reporting this to the correct repository?
- [ ] Are there any related or duplicate Issues or PRs for this issue?
### Environment
Please provide the following:
- React Native Auth0 version
2.1.1
- React Native version
0.60.5
1 Like
BSK
May 14, 2024, 10:45am
4
Thank you, I think that might help!
1 Like
system
Closed
May 28, 2024, 10:46am
5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.