fix: expose reInitialize from @asgardeo/react & @asgardeo/nextjs#181
Merged
brionmario merged 2 commits intoasgardeo:mainfrom Sep 29, 2025
Merged
fix: expose reInitialize from @asgardeo/react & @asgardeo/nextjs#181brionmario merged 2 commits intoasgardeo:mainfrom
reInitialize from @asgardeo/react & @asgardeo/nextjs#181brionmario merged 2 commits intoasgardeo:mainfrom
Conversation
3304391 to
6f49213
Compare
DonOmalVindula
approved these changes
Sep 29, 2025
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 a new method,
reInitialize, across the Asgardeo JavaScript SDK clients (core, React, and Next.js) to allow dynamic re-initialization of the client with a partial configuration. This enables updating configuration fields without a full re-initialization, improving flexibility for applications that need to update authentication settings at runtime. The method is added to the core client interface, implemented in the React and Next.js clients, and exposed through the relevant context/provider layers.Core SDK Enhancements:
reInitializeabstract method to the coreAsgardeoJavaScriptClientclass and theAsgardeoClientinterface, allowing clients to be re-initialized with partial configuration updates. [1] [2]Next.js SDK Updates:
reInitializemethod inAsgardeoNextClient, including error handling and return value, and exposed it via the server utility inasgardeo.ts. [1] [2] [3]React SDK Updates:
reInitializemethod inAsgardeoReactClientwith loading state management and error handling.reInitializeto theAsgardeoContextPropstype and provided it in the default context and through theAsgardeoProvider, making it available to React consumers. [1] [2] [3]Related Issues
Related PRs
Checklist
Security checks