Implement multi organization context management support#374
Open
kavindadimuthu wants to merge 5 commits intoasgardeo:mainfrom
Open
Implement multi organization context management support#374kavindadimuthu wants to merge 5 commits intoasgardeo:mainfrom
kavindadimuthu wants to merge 5 commits intoasgardeo:mainfrom
Conversation
55d5d64 to
492ab15
Compare
492ab15 to
99dda63
Compare
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request introduces multi-organization authentication context support, enabling users to authenticate and exchange tokens across different organization contexts. The main changes include improvements in session and storage management keyed by instance, and new configuration options and React components for organization chaining.
Multi-organization context and token exchange support:
organizationChainconfiguration to bothBaseConfigandDefaultAuthClientConfig, allowing specification ofsourceInstanceIdandtargetOrganizationIdfor chained authentication and token exchange between organizations. [1] [2]exchangeTokenandreplaceCustomGrantTemplateTagslogic to fetch session data from the appropriate organization context, using theorganizationChainconfiguration to determine the correct instance for access tokens. [1] [2] [3] [4]Session and storage management improvements:
StorageManagerto support resolving keys and retrieving session data based on bothuserIdandinstanceId, ensuring correct data isolation between organization contexts. [1] [2]React SDK enhancements:
OrganizationContextReact component to encapsulate organization context configuration and propagate it through the component tree, supporting nested/multi-organization scenarios.AsgardeoReactClient.switchOrganizationto utilize the neworganizationChainconfiguration and determine if sign-in is required based on the presence of asourceInstanceId. [1] [2]These changes collectively enable seamless authentication flows across multiple organizations, improve isolation of authentication state, and provide a more robust foundation for multi-tenant applications.
Related Issues
Related PRs
Checklist
Security checks