Skip to content

feat(auth): implement token refresh with retry logic and error handling - #25

Merged
sharjeelyunus merged 2 commits into
mainfrom
token-retry-logic
Aug 19, 2026
Merged

feat(auth): implement token refresh with retry logic and error handling#25
sharjeelyunus merged 2 commits into
mainfrom
token-retry-logic

Conversation

@sharjeelyunus

Copy link
Copy Markdown
Member
  • Added TokenRefreshError class to handle token refresh errors with retryable status.
  • Enhanced refreshIdToken function to retry token refresh on transient errors and specific HTTP status codes (429, 500).
  • Introduced utility functions for parsing refresh responses and checking token expiry.
  • Updated tests to cover new retry logic and error scenarios for token refresh.

- Added `TokenRefreshError` class to handle token refresh errors with retryable status.
- Enhanced `refreshIdToken` function to retry token refresh on transient errors and specific HTTP status codes (429, 500).
- Introduced utility functions for parsing refresh responses and checking token expiry.
- Updated tests to cover new retry logic and error scenarios for token refresh.
- Updated the function signature of `sessionFromStoredUser` for improved readability by removing unnecessary line breaks.
- Enhanced code formatting in the test file for better consistency and clarity.
@sharjeelyunus
sharjeelyunus merged commit 21ff58f into main Aug 19, 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.

1 participant