coder/coder-v1-cli

Wrong auth url from cli on login

stockmind opened this issue · 3 comments

Hello guys,

i've just installed latest coder (Coder v0.8.13+ad24404) on a dokku server.
The app launch and seems to work fine.

My problem arise when i try to login with the coder CLI from macOS:

Your browser has been opened to visit:

	https://mydomain/internal-auth?show_token=true

The provided link doesn't exists, and gives me a 404:

404
This page could not be found.

Doing some research i can see that the correct url seems to be:

https://mydomain/cli-auth

And this page provides me a token.

The CLI is outdated? I've done something wrong?

I must also admit that even after providing the token i get this error right after, so i'm basically stuck:

warning: version mismatch detected
  | Coder CLI version: v1.34.0
  | Coder API version: unknown
  |
  | tip: download the appropriate version here: https://github.com/coder/coder-cli/releases
  | tip: alternatively, run `coder update`
fatal: login error: ping API with credentials: call api: &{   false  false       []    false   <nil>} (*models.UserWithUXState) is not supported by the TextConsumer, can be resolved by supporting TextUnmarshaler interface

But maybe this latest error is a configuration issue on my side?

Same problem here!
Have you managed to solve it @stockmind ?

Ok i found the problem @stockmind, if you're using Coder V2 you must install the .exe from this repo -> https://github.com/coder/coder
This repo is only for the V1.

Thank you very much, noticed the alert on the README by chance later but didn't had time to retry. I've just retried now using that cli and now it says to me that the token is invalid 😄 Will try to update the remote deployment.

EDIT: I confirm, with latest version (v0.13.1+9e80322) and the cli linked above login works 😄