jsdelivr/globalping-cli

Token refresh fallback doesn't work

Closed this issue · 1 comments

  1. Sign in (via the web flow or via --with-token, both are broken).
  2. Edit the storage JSON - remove one letter from the access token (to simulate the case it was revoked).
  3. Message Access token successfully refreshed. Try repeating the measurement. is printed, but the token isn't actually refreshed, and the same happens on the next measurement.

Note, when the token comes from --with-token, there's no refresh token to use, so we should fail instead with "Error: Your access token has been rejected by the API. Try signing in with a new token, or sign out."

@radulucut please prioritize this over Slack, as we'll want to make a release within a week.