-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Current Limitation
Currently, the Asgardeo client operates as a singleton within the application runtime. This restricts the application to initializing only a single AuthProvider instance. Consequently, developers cannot manage multiple authentication contexts simultaneously, such as connecting to different organizations or handling distinct authentication flows within the same application (eg: in a Micro-frontend architecture).
Suggested Improvement
Extend the Asgardeo client initialization logic to accept an optional instanceID parameter.
- Implementation: When an instanceID is passed during initialization, the SDK should use this ID to namespace or scope the storage (session data) and the provider context.
- Outcome: This change would allow multiple independent instances of the Asgardeo provider to coexist within the same application, enabling complex scenarios like multi-tenancy within a single UI shell.
Please select the package issue is related to
@asgardeo/react, @asgardeo/browser, @asgardeo/javascript
Version
N/A
Reporter Checklist
- I have searched the existing issues and this is not a duplicate.
- I have provided all the necessary information.
- I have verified the improvement is not available in the latest version of the package.