Skip to content

[codex] Harden token refresh retry handling#398

Merged
jjoonleo merged 1 commit into
mainfrom
feat/implement-issue-390
May 7, 2026
Merged

[codex] Harden token refresh retry handling#398
jjoonleo merged 1 commit into
mainfrom
feat/implement-issue-390

Conversation

@jjoonleo

@jjoonleo jjoonleo commented May 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Store both refreshed access and refresh tokens from the refresh response headers.
  • Ensure queued requests are always resolved or rejected after refresh.
  • Mark refresh and post-refresh retry requests to avoid recursive refresh loops.
  • Add focused interceptor tests for token rotation, concurrent queued requests, retry failures, and refresh failure sign-out.

Root Cause

The token refresh flow persisted only the refreshed access token, leaving rotated refresh tokens stale. Queued request retries also swallowed retry failures, which could leave original request handlers without a clear failure path.

Validation

  • flutter test test/core/dio/interceptors/token_interceptor_test.dart
  • flutter analyze
  • flutter test
  • git diff --check

Closes #390

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 8bd3fd7):

https://ontime-c63f1--pr398-feat-implement-issue-e57leyly.web.app

(expires Thu, 14 May 2026 04:25:06 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 7d60a2eae4c4a5839220ed6a57552a3b61cce5a3

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 8bd3fd7):

https://on-time-front-widgetbook--pr398-feat-implement-issue-02irfmfk.web.app

(expires Thu, 14 May 2026 04:26:04 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: e53128a376fed0209d449279de9c0d94c83cdd8b

@jjoonleo jjoonleo marked this pull request as ready for review May 7, 2026 05:21
@jjoonleo jjoonleo merged commit daa623a into main May 7, 2026
4 checks passed
@jjoonleo jjoonleo deleted the feat/implement-issue-390 branch May 7, 2026 05:21
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.

[Production readiness] Harden token refresh and queued request retry handling

1 participant