Skip to content
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

How do you recover from Error: Invalid client ID or access token error message? #166

Closed
macdonst opened this issue Dec 21, 2023 · 1 comment
Assignees

Comments

@macdonst
Copy link
Member

This issue was originally reported by tiny_m over on Discord, and I ran into it myself tonight as well.

How does one tell the CLI to generate a new access token?

The only way I have found to be able to fix this issue is to remove ~/.begin/config.json and do a new begin login

Expected behaviour

I would expect that running:

begin logout
begin login

Would generate a new access token, but it does not. Any begin command I execute after that still gives me the same error message. This includes begin tokens create that the user suspected they might be able us to fix the problem.

Steps to reproduce

  1. I need to figure out how to get into the invalid access token state other than a really old config.json file I had for the staging API.

Platform version

  • MacOS 14.2.1
  • Begin version: main-21f0079
  • Node.js v18.15.0
@tbeseda tbeseda self-assigned this Jan 23, 2024
@tbeseda
Copy link
Member

tbeseda commented Jan 23, 2024

I got this narrowed down a bit:

begin logout tries to destroy the current session's access token via the Begin API. This is great but it can fail if that current token is stale. If it fails, the CLI doesn't update the local config to remove that token. So you're stuck.

Instead, the CLI should attempt to delete its own access token and then always remove that token from the local config.

If that current token is already expired, another client can't use it anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants