Skip to content

automatically log back in on API key expiry #2994

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spikecurtis opened this issue Jul 14, 2022 · 1 comment
Closed

automatically log back in on API key expiry #2994

spikecurtis opened this issue Jul 14, 2022 · 1 comment
Labels
cli Area: CLI stale This issue is like stale bread.

Comments

@spikecurtis
Copy link
Contributor

Running a CLI command with an expired API key gives:

% coder ls
GET https://dev.coder.com/api/v2/workspaces?q=: unexpected status code 401: API key expired at "2022-07-08 23:29:45.030833 +0000 UTC".: Try logging in using 'coder login <url>'.
Run 'coder list --help' for usage.  

It would be great if the CLI bounced me to log back in instead of just telling me to run a different command. It would also be really great if after successfully logging in, it re-runs the original command.

AC:
For all CLI commands that require authentication, try them with an expired API token, and verify that you are redirected to the browser login page.

After successfully logging in and pasting the token, verify that the original command is run.

@github-actions
Copy link

This issue is becoming stale. In order to keep the tracker readable and actionable, I'm going close to this issue in 7 days if there isn't more activity.

@github-actions github-actions bot added the stale This issue is like stale bread. label Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Area: CLI stale This issue is like stale bread.
Projects
None yet
Development

No branches or pull requests

1 participant