Frontend: send access token, refresh once on 401 #59

Merged
ryan merged 1 commits from fix/access-token-auth into main 2026-10-12 17:49:18 -04:00

1 Commits

Author SHA1 Message Date
Ryan Chen 004a9bc85d Frontend: send access token, refresh once on 401
Collapse fetchWithRefreshToken/fetchWithAuth into a single fetchWithAuth
that sends the access token, refreshes up front when none is stored, and
on a 401 refreshes once (deduplicated across concurrent calls) and retries.
The refresh token is now only sent to /api/user/refresh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:44:34 -04:00