Skip to content

Add new tokenLifecycle configuration to replace legacy periodicTokenRefresh#435

Merged
brionmario merged 3 commits intoasgardeo:mainfrom
NipuniBhagya:main
Apr 2, 2026
Merged

Add new tokenLifecycle configuration to replace legacy periodicTokenRefresh#435
brionmario merged 3 commits intoasgardeo:mainfrom
NipuniBhagya:main

Conversation

@NipuniBhagya
Copy link
Copy Markdown
Contributor

Purpose

This pull request introduces a new configuration option for token lifecycle management in both the JavaScript and React SDKs. The main change is the addition of a tokenLifecycle.refreshToken.autoRefresh config property, which replaces the legacy periodicTokenRefresh option. This provides a more structured and future-proof way to manage token auto-refresh behavior.

Token Lifecycle Management Improvements:

  • Added a new tokenLifecycle.refreshToken.autoRefresh configuration property to BaseConfig in config.ts, allowing users to enable or disable automatic access token refresh in a more structured way.
  • Updated the React client (AsgardeoReactClient.ts) to use the new tokenLifecycle.refreshToken.autoRefresh property, while maintaining backward compatibility by falling back to the legacy periodicTokenRefresh if the new config is not set.

Documentation and Metadata:

  • Added a changeset describing the new config option and its purpose for both @asgardeo/javascript and @asgardeo/react.
  • Updated copyright years in config.ts and AsgardeoReactClient.ts. [1] [2]

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

brionmario
brionmario previously approved these changes Mar 30, 2026
brionmario
brionmario previously approved these changes Mar 30, 2026
Updated versioning for @asgardeo/javascript and @asgardeo/react to minor. Added tokenLifecycle.refreshToken.autoRefresh configuration to replace legacy periodicTokenRefresh.
@asgardeo-github-bot
Copy link
Copy Markdown

🦋 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 a0b8888 into asgardeo:main Apr 2, 2026
1 check 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