Skip to content

Fix refresh issues in Asgardeo V2#413

Merged
brionmario merged 6 commits intoasgardeo:mainfrom
brionmario:refactor-thunder-flows
Mar 19, 2026
Merged

Fix refresh issues in Asgardeo V2#413
brionmario merged 6 commits intoasgardeo:mainfrom
brionmario:refactor-thunder-flows

Conversation

@brionmario
Copy link
Member

@brionmario brionmario commented Mar 19, 2026

Purpose

This pull request introduces improvements to how persisted and session data are managed across the JavaScript and React SDKs, with a focus on handling the applicationId and cleaning up the use of browser storage for configuration. The changes add a new persisted data store, ensure applicationId is retained across sessions, and simplify how configuration is managed and accessed in React components.

Persisted Data Store and Application ID Handling:

  • Added a new PersistedData store type in the Stores enum to retain data such as applicationId across sessions and application restarts. (packages/javascript/src/models/store.ts)
  • Implemented getPersistedData and setPersistedData methods in StorageManager to read and write to the new persisted data store. (packages/javascript/src/StorageManager.ts)
  • Updated AsgardeoAuthClient to store and retrieve applicationId in the persisted data store, ensuring it is available even if not provided in the config on subsequent loads. (packages/javascript/src/__legacy__/client.ts)

React SDK Configuration and Storage Cleanup:

  • Removed the use of sessionStorage for storing platform and baseUrl in the React provider and related logic, relying instead on the configuration object directly. (packages/react/src/contexts/Asgardeo/AsgardeoProvider.tsx, packages/react/src/AsgardeoReactClient.ts) [1] [2] [3]
  • Updated the React context to use applicationId from the config, ensuring consistency and reflecting the new persisted data approach. (packages/react/src/contexts/Asgardeo/AsgardeoProvider.tsx)

Related Issues

Related PRs

  • N/A

Checklist

  • Followed the CONTRIBUTING guidelines.
  • Manual test round performed and verified.
  • Documentation provided. (Add links if there are any)
  • Unit tests provided. (Add links if there are any)

Security checks

@asgardeo-github-bot
Copy link

🦋 Changeset detected

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

@brionmario brionmario merged commit 9b19b55 into asgardeo:main Mar 19, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants