Skip to content

Add tokenRefreshLeeway for early access‑token refreshes#2508

Open
nandan-bhat wants to merge 1 commit intomainfrom
improvement/gh-2428
Open

Add tokenRefreshLeeway for early access‑token refreshes#2508
nandan-bhat wants to merge 1 commit intomainfrom
improvement/gh-2428

Conversation

@nandan-bhat
Copy link
Contributor

@nandan-bhat nandan-bhat commented Jan 28, 2026

Changes

  • Added tokenRefreshLeeway (seconds) to Auth0Client config.
  • getAccessToken now refreshes when a token is within the leeway window and a refresh token is available.
  • Tests cover early refresh, no‑refresh outside leeway, missing refresh token cases, and invalid config.

Fixes

@nandan-bhat nandan-bhat requested a review from a team as a code owner January 28, 2026 18:39
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.26%. Comparing base (7a15b30) to head (a21a87f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2508      +/-   ##
==========================================
+ Coverage   91.22%   91.26%   +0.04%     
==========================================
  Files          39       39              
  Lines        4705     4718      +13     
  Branches      987      998      +11     
==========================================
+ Hits         4292     4306      +14     
+ Misses        407      406       -1     
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants

Comments