hippo-cli icon indicating copy to clipboard operation
hippo-cli copied to clipboard

CLI should check if token has expired

Open bacongobbler opened this issue 2 years ago • 0 comments

I've noticed when attempting to run commands the following day, I see errors like the following:

><> hippo app add helloworld helloworld
Error:

Under the hood, the client received a 401 Unauthorized response from the API server.

The CLI should do two things:

  1. If the token in the local config cache has expired, prompt the user with their password to reissue a new token.
  2. If the token has NOT expired AND the client receives a 401 Unauthorized response, prompt the user to log back in with authorized credentials (e.g. log in as an administrator)

bacongobbler avatar Feb 16 '22 18:02 bacongobbler