-
Notifications
You must be signed in to change notification settings - Fork 49
Add support for multiple Asgardeo Provider instances via optional instanceID #325
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
Add support for multiple Asgardeo Provider instances via optional instanceID #325
Conversation
packages/react/src/models/config.ts
Outdated
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.
Lets add instanceId?: number; to the top most Config interface:
/packages/javascript/src/models/config.ts
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.
Added instanceId?: number; to top most Config interface in @asgardeo/javascript package
asgardeo-github-bot
commented
Jan 29, 2026
⚠️ No Changeset found
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go.If these changes should result in a version bump, you need to add a changeset.
Refer Release Documentation to learn how to add a changeset.
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.
Uh oh!
There was an error while loading. Please reload this page.
Purpose
This pull request introduces support for multiple authentication contexts ("multi-auth context") in the Asgardeo React SDK by adding an
instanceIdparameter throughout the authentication client and provider. This enables applications to manage multiple independent authentication sessions within the same app instance. The most important changes are grouped below:Multi-auth context support:
instanceIdproperty to theAsgardeoReactConfiginterface to allow configuration of multiple authentication contexts.AsgardeoReactClientclass to accept aninstanceIdin its constructor, store it, and provide agetInstanceId()method. TheAuthAPIis now initialized with theinstanceIdas well.AuthAPIclass to accept and store aninstanceId, pass it to the underlying SPA client, and expose agetInstanceId()method. [1] [2]AsgardeoProviderReact component to accept an optionalinstanceIdprop (defaulting to 0), and to instantiate theAsgardeoReactClientwith this value, ensuring correct context isolation.Related Issues
Related PRs
Checklist
Security checks