-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: added support for domain switching #931
Conversation
public void hasValidAuth0Instance(Promise promise) { | ||
promise.resolve(this.auth0 != null && this.secureCredentialsManager != null); | ||
public void hasValidAuth0Instance(String clientId, String domain, Promise promise) { | ||
promise.resolve(this.auth0 != null && this.auth0.getClientId().equals(clientId) && this.auth0.getDomainUrl().contains(domain)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contains
check needs to be reworked
…ain changes Signed-off-by: Sai Venkat Desu <venkat.desu@okta.com>
Signed-off-by: Sai Venkat Desu <venkat.desu@okta.com>
Signed-off-by: Sai Venkat Desu <venkat.desu@okta.com>
…to fix snyk vulnerabilities (#938)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…933) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…3.0 (#920) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Desu Sai Venkat <48179357+desusai7@users.noreply.github.com>
2bfb9bd
to
b6d8aad
Compare
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? |
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 |
Added support for domain switching
Updated the
hasValidAuth0Instance
method in bothAndroid
&iOS
modules to check if the existing auth0 instanceclientId
&domain
are same as theclientId
&domain
passed from the React Native layer and if they are different we are creating new instance ofAuth0
, this would enable customers to switch between different domains quickly.To support multiple domains in an Android app, developers need to add intent filters to their
AndroidManifest.xml
file. The following code snippet demonstrates how to do this. By incorporating these changes, the defaultIntentFilter
provided by the library is overridden, eliminating the need to specifymanifestPlaceHolders
in the app's build.gradle file. Simply add a<data>
element within the<intent-filter>
ofcom.auth0.android.provider.RedirectActivity
for each domain you wish to accommodate.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