You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I first upgraded to the hcp v0.3 binary, and I run hcp and get the below warning along with the help description. Is that expected?
I used brew install to do so, and I'm on a MacOS.
➜ workspace hcp
2024/06/18 06:30:38 failed to refresh the token: oauth2: "invalid_grant" "The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client."
USAGE
hcp <command> [Optional Flags]
DESCRIPTION
The HCP command-line interface (CLI) is a unified tool to manage your HCP
services.
COMMAND GROUPS
auth: Authenticate to HCP.
iam: Manage identity and access management.
organizations: Interact with an existing organization.
profile: View and edit HCP CLI properties.
projects: Create and manage projects.
vault-secrets: Manage Vault Secrets.
waypoint: Manage HCP Waypoint.
COMMANDS
version: Display the HCP CLI version.
GLOBAL FLAGS
--debug
Enable debug output.
--format=FORMAT
Sets the output format.
--profile=NAME
The profile to use. If omitted, the currently selected profile will be used.
--project=ID
The HCP Project ID to use. If omitted the current project set in the
configuration is used.
--quiet
Minimizes output and disables interactive prompting.
The text was updated successfully, but these errors were encountered:
Interesting. Did you by chance edit any files in ~/.config/hcp manually? Any other information you can share about steps you took before running the hcp command that relate to authenticating to hcp?
I was able to reproduce only by manually creating an invalid creds-cache.json.
Things I tried include:
Invalidating all sessions via the HCP Portal. That displayed a help message to logout and back in as intended.
Modified the creds-cache to inject an invalid refresh token and forcing an expired token. That caused 2024/06/21 18:03:40 failed to refresh the token: oauth2: "invalid_request" "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Make sure that the various parameters are correct, be aware of case sensitivity and trim your parameters. Make sure that the client you are using has exactly whitelisted the redirect_uri you specified."
If I replaced the login section of the creds-cache.json with a SP access token and refresh token in the login section, then I saw the error you reported.
When I first upgraded to the hcp v0.3 binary, and I run hcp and get the below warning along with the help description. Is that expected?
I used brew install to do so, and I'm on a MacOS.
The text was updated successfully, but these errors were encountered: