-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
Description
When an application utilizes multiple instances of the AsgardeoProvider component, typically to support concurrent logins for different users or organizations within the same frontend application, authenticated API calls triggered via the SDK fail.
It appears that the SDK may not be correctly isolating the authentication state (tokens, HTTP client instances, or storage keys) between the different provider contexts. This results in the httpRequest or related API helpers failing to attach the correct Authorization header, or using the wrong token context.
Steps to Reproduce
- Initialize a React application.
- Wrap two different parts of the component tree with distinct AsgardeoProvider instances (e.g., Provider A for Org A and Provider B for Org B), configured with different credentials and scopes.
- Authenticate a user successfully in Provider A.
- Authenticate a different user successfully in Provider B.
- Attempt to make a secure API call using the httpRequest method from within a component wrapped by Provider B (or Provider A).
Please select the area the issue is related to
@asgardeo/react, @asgardeo/browser, @asgardeo/javascript
Version
N/A
Environment Details (with versions)
No response
Reporter Checklist
- I have searched the existing issues and this is not a duplicate.
- I have provided all the necessary information.
- I have tested the issue on the latest version of the package.