# How do we support multiple auth0 domains on Android in a React-Native project

**URL:** <https://community.auth0.com/t/how-do-we-support-multiple-auth0-domains-on-android-in-a-react-native-project/88441>\
**Category:** Get Help\
**Tags:** auth0\
**Created:** [August 9, 2022, 6:25pm UTC](https://community.auth0.com/t/how-do-we-support-multiple-auth0-domains-on-android-in-a-react-native-project/88441 "2022-08-09T18:25:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgao](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mgao/32/35982_2.png) [@mgao](https://community.auth0.com/u/mgao)\
**Post date:** [August 9, 2022, 6:25pm UTC](https://community.auth0.com/t/how-do-we-support-multiple-auth0-domains-on-android-in-a-react-native-project/88441/1 "2022-08-09T18:25:52Z")

</div>

Please include the following information in your post:

- Which SDK this is regarding:
- SDK Version: “react-native-auth0”: “^2.12.0”,
- Platform Version: Android version 12
- Code Snippets/Error Messages/Supporting Details/Screenshots:

Hello,

I’m working on an app that we allow users dynamically choose different Auth0 tenant which means we need to support more than one auth0Domain on the go.

In this document [https://auth0.com/docs/quickstart/native/react-native/00-login](https://auth0.com/docs/quickstart/native/react-native/00-login), it seems we are hardcoding the auth0Domain in build.gradle manifestPlaceholders = [auth0Domain: “YOUR\_DOMAIN”, auth0Scheme: “${applicationId}”]. This will make Auth0 callback for other auth0Domain fail.

### Configure Android

Open your app’s `build.gradle` file (typically at `android/app/build.gradle`) and add the following manifest placeholders. The value for `auth0Domain` should be populated from your Auth0 application settings [as configured above](https://auth0.com/docs/quickstart/native/react-native/00-login#get-your-application-keys).

```auto
android {
    defaultConfig {
        // Add the next line
        manifestPlaceholders = [auth0Domain: "dev- *****.us.auth0.com", auth0Scheme: "${applicationId}"]
    }
    ...
}

```

How can we workaround this and support more auth0Domains?

Many thanks,

---

<div class="post-metadata">

**Author:** ![jurito](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jurito/32/47450_2.png) [@jurito](https://community.auth0.com/u/jurito)\
**Post date:** [May 22, 2023, 1:16pm UTC](https://community.auth0.com/t/how-do-we-support-multiple-auth0-domains-on-android-in-a-react-native-project/88441/2 "2023-05-22T13:16:42Z")

</div>

I’m currently in the very same situation. Could you find a workaround?

---

<div class="post-metadata">

**Author:** ![jcharlat](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jcharlat/32/42908_2.png) [@jcharlat](https://community.auth0.com/u/jcharlat)\
**Post date:** [May 31, 2024, 7:45pm UTC](https://community.auth0.com/t/how-do-we-support-multiple-auth0-domains-on-android-in-a-react-native-project/88441/3 "2024-05-31T19:45:52Z")

</div>

Same problem here. Auth0 is very not flexible.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [May 31, 2024, 9:50pm UTC](https://community.auth0.com/t/how-do-we-support-multiple-auth0-domains-on-android-in-a-react-native-project/88441/4 "2024-05-31T21:50:27Z")

</div>

The following post may be helpful:

> [@Is it possible to change tenants at runtime based on the environment I have selected from a environment picker?](https://community.auth0.com/t/is-it-possible-to-change-tenants-at-runtime-based-on-the-environment-i-have-selected-from-a-environment-picker/133972/3):
>
> Hey there @BSK ! While not officially supported OOB, the following discussion may be helpful:

---

<div class="post-metadata">

**Author:** ![bharath31](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bharath31/32/57599_2.png) [@bharath31](https://community.auth0.com/u/bharath31)\
**Post date:** [August 6, 2024, 6:24am UTC](https://community.auth0.com/t/how-do-we-support-multiple-auth0-domains-on-android-in-a-react-native-project/88441/5 "2024-08-06T06:24:29Z")

</div>

This is now supported in [v4.0.0](https://github.com/auth0/react-native-auth0/releases/tag/v4.0.0-beta.0) of react-native-auth0. Checkout the example provided [here](https://github.com/auth0/react-native-auth0/blob/master/EXAMPLES.md#domain-switching).

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [November 21, 2024, 10:52pm UTC](https://community.auth0.com/t/how-do-we-support-multiple-auth0-domains-on-android-in-a-react-native-project/88441/6 "2024-11-21T22:52:38Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
