Fix app-native flow issues in AsgardeoV2 (Thunder) #340
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 a new generic
decodeJwtTokenmethod across the Asgardeo SDK, enabling consistent decoding of JWT token payloads in both JavaScript and React clients. It also updates interfaces and internal logic to use this new method instead of the previousdecodeIdToken, and adds support for session management in embedded sign-in flows for Asgardeo V2. Minor code quality improvements and temporary debugging statements are also included.JWT Token Decoding Support:
decodeJwtTokenmethod to the main client classes (AsgardeoSPAClient,AsgardeoAuthClient, andAsgardeoReactClient) and their respective interfaces, allowing for flexible decoding of JWT payloads. This replaces the olderdecodeIdTokenusage throughout the codebase. [1] [2] [3] [4] [5] [6] [7] [8] [9]decodeJwtTokenmethod in both the main thread and web worker clients, ensuring compatibility across environments. [1] [2] [3] [4]Session Management Enhancements:
setSessionmethod to the client interfaces and implemented it in the React client for improved session management flexibility. [1] [2] [3]Internal and Developer Experience Improvements:
decodeIdTokentodecodeJwtTokenin authentication helpers and internal logic for consistency. [1] [2] [3]decodeJwtTokenmethod in both the JavaScript and React SDKs. [1] [2] [3]Debugging and Temporary Code:
AsgardeoProvidercontext to assist with development and troubleshooting.getStorageManager(SPA client) for compatibility or debugging purposes.Dependency and Import Updates:
EmbeddedSignInFlowStatusV2for React client enhancements.These changes collectively improve the flexibility, maintainability, and developer experience of the Asgardeo SDK by standardizing JWT token decoding and enhancing session management.
Related Issues
Related PRs
Checklist
Security checks