auth0 / react-native-auth0

React Native toolkit for Auth0 API
https://auth0.com
MIT License
481 stars 206 forks source link

feat: added support for domain switching #931

Closed desusai7 closed 1 month ago

desusai7 commented 2 months ago

Added support for domain switching

    <activity
      android:name="com.auth0.android.provider.RedirectActivity" tools:node="replace"
      android:exported="true">
      <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="domain1"
          android:pathPrefix="/android/${applicationId}/callback"
          android:scheme="${applicationId}.auth0" />
        <data
          android:host="domain2"
          android:pathPrefix="/android/${applicationId}/callback"
          android:scheme="${applicationId}.auth0" />
      </intent-filter>
    </activity>

References

747

911

Testing

Since these changes are made on the bridge layers of both Android and iOS platforms, we do not have test setup there, so updated the sample app to use multiple domains in two different screens by default and tested it on both Android and iOS platforms.

Checklist

MAlvesKitestring commented 1 month ago

Hey, guys! @desusai7 @poovamraj Great feature, thanks for working on it!

We are using expo, do you guys know how we could use it? Is it available through some config plugin property?

desusai7 commented 1 month ago

Hi @MAlvesKitestring,

We've released this just now as part of version 4.0.0-beta.0, yes, we are supporting expo as well, please check out more on it here