aws / aws-toolkit-vscode

Amazon Q, CodeCatalyst, Local Lambda debug, SAM/CFN syntax, ECS Terminal, AWS resources
https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.amazon-q-vscode
Apache License 2.0
1.47k stars 408 forks source link

invalid_client error when signing in with AWS Builder ID #3706

Closed msbeeman closed 1 year ago

msbeeman commented 1 year ago

Problem

When attempting to sign in with the builder ID through VS Code, am always getting a 'invalid_client' during the authentication process.

Troubleshooting

I've tried:

Steps to reproduce the issue

  1. Go to Developer Tools in VS Code

  2. Click on CodeWhisperer

  3. Click Start

  4. Click on 'Sign up or Sign in:

    image
  5. Copy Code and Proceed

    image
  6. Re-directed to https://device.sso.us-east-1.amazonaws.com/ and asked to enter code

image

  1. Enter in code

  2. See error received 'invalid_client'.

image

  1. Network tab shows 401 unauthorized response. Client ID in the 401 unauthorized response seems to be different than the client ID in the authorize request. Noticed the request clientId seems to start with 'Vjhfek...' while the unauthorized response clientId seems to start with 'V8_z...' image

Expected behavior

For the sign in to work and be able to enable code whisperer.

System details (run the AWS: About Toolkit command)

OS: Darwin arm64 22.5.0 (Mac OS Venture 13.4 (22F66)) Visual Studio Code extension host: 1.81.0 AWS Toolkit: 1.83.0 node: 16.17.1 electron: 22.3.18

msbeeman commented 1 year ago

Fix was to delete the hidden Home/AWS/SSO folder, old cached credentials in there.

image