How to login with V3 CLI?

Hello,
I’m proud, that I was able to move my first test device from V2 to V3 stack (eu1).

Now I want to logon with CLI, but had no success.

  • created configuration
    ./ttn-lw-cli use eu1.cloud.thethings.network
  • try to logon, but I have no browser on that machine
    ./ttn-lw-cli login --callback=false
  • I copy the mentioned URL to my browser:
    https://eu1.cloud.thethings.network/oauth/authorize?client_id=cli&redirect_uri=code&response_type=code
    Then there is a redirect to the site
    https://eu1.cloud.thethings.network/oauth/code?code=MF<some more session code chars>&state=
    and the error code is “Not found
    The page you requested cannot be found”

This happens, when I’m already logged on on console. When I’m not logged on, I must enter my user/password, but the final error message is the same.

What am I doing wrong? I could not find any hints in the documentation.

Kind regards,
Frank

Meanwhile I found myself the solution. :slightly_smiling_face:
You must not be confused by the error message “not found”.

The required token is in the URL after “code=”.

2 Likes

Thanks for sharing the solution!