redhat-developer / vscode-openshift-tools

OpenShift extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=redhat.vscode-openshift-connector
MIT License
93 stars 59 forks source link

When logging into sandbox using quick pick workflow with token, token is "invalid" #4459

Closed datho7561 closed 1 week ago

datho7561 commented 1 week ago

To reproduce this issue:

  1. start a Red Hat OpenShift Sandbox cluster
  2. log into the cluster using the command line (oc login ...), then log out on command line (oc logout)
  3. in VS Code OpenShift Toolkit, use the Application Explorer to login to the cluster by pressing the "Login" button
  4. it should be a series of quickpicks
  5. select the sandbox cluster
  6. select "token" as the method of authentication
  7. copy the login token from within the sandbox cluster ui by double clicking the token then pressing Ctrl+C
  8. paste the token into the quickpick for the token

It should state that the token is invalid and prevent you from continuing through the wizard.

  1. remove the first and last character of the token

Now, it will list the token as valid.

Something other than the token is being added into the copied text, and it isn't being removed before we attempt to validate the token.

datho7561 commented 1 week ago

Fixed by #4460