Skip to content

fix: support runtime tenant/domain switching#1564

Draft
subhankarmaiti wants to merge 1 commit into
masterfrom
fix/multi-tenant-domain-switching
Draft

fix: support runtime tenant/domain switching#1564
subhankarmaiti wants to merge 1 commit into
masterfrom
fix/multi-tenant-domain-switching

Conversation

@subhankarmaiti

Copy link
Copy Markdown
Contributor

Summary

Fixes switching between Auth0 tenants (domain/clientId) at runtime. Previously,
changing the domain or clientId did not take effect — calls kept targeting the
original tenant.

JS-only fix — no native iOS/Android changes required. Works on bare React Native
and Expo.

Notes

  • Switching tenants does not instantly clear the displayed user; the provider
    re-initializes for the new tenant and updates user once that completes.
    Credentials are stored per tenant, so an already-logged-in user is restored.
  • You still need to register each tenant's callback at build time (manifest /
    Info.plist / Expo plugin). See the new "Switching tenants at runtime" section
    in EXAMPLES.md.

Test plan

  • Switch tenant at runtime and confirm authorize() opens the newly selected
    tenant's login and the redirect resolves.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e246b245-8386-4a92-a097-44467ad44793

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/multi-tenant-domain-switching

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant