Exchange the current (still-valid) bearer token for a fresh one via
POST /auth/refresh, updating storage on success.
NB: this backend can only refresh a token that is still valid — once a
token has expired (and started returning 401) it cannot be refreshed, so
this is a proactive mechanism, not a 401 recovery path. Uses raw fetch
(not the 401-aware wrapper) to avoid recursive teardown.
Exchange the current (still-valid) bearer token for a fresh one via
POST /auth/refresh, updating storage on success.NB: this backend can only refresh a token that is still valid — once a token has expired (and started returning 401) it cannot be refreshed, so this is a proactive mechanism, not a 401 recovery path. Uses raw
fetch(not the 401-aware wrapper) to avoid recursive teardown.