Skip to main content
Troubleshooting

Sign-in and Authentication Issues

Resolve sign-in issues related to browser callbacks, accounts, tokens, and authentication networking

This page helps you resolve common issues during sign-in and authentication. For sign-in methods, see Sign-in and Authentication.

Browser callback fails

Browser sign-in opens an authorization page and calls back to your machine when done. If it is stuck waiting for the callback:
  • Confirm the browser successfully opened the authorization page and you completed the authorization.
  • In environments without a graphical interface (CI, SSH sessions without DISPLAY, BROWSER=www-browser, and so on), the CLI automatically skips launching the browser, and the sign-in screen itself prints a copyable sign-in URL — open that URL manually in a browser.
  • You can also choose the Qoder Personal Access Token option among the sign-in methods in /login and paste the token directly to authenticate.
  • For long-term use on servers without a graphical interface, switch to Personal Access Token (PAT) authentication (see below).
  • The local callback port may be blocked by a firewall or occupied by another process; close the occupying process and retry.
  • After completing the authorization, switch back to the terminal manually and wait for the sign-in state to refresh.

Signing in without a browser

On CI/CD or servers without a browser, use PAT authentication:
  1. Generate a Personal Access Token at Qoder Integrations.
  2. Provide it via an environment variable:
    # Linux / macOS
    export QODERCN_PERSONAL_ACCESS_TOKEN="<your token>"
    
    # Windows (Command Prompt); do not add quotes — CMD stores them in the variable value
    set QODERCN_PERSONAL_ACCESS_TOKEN=<your token>
    
    # Windows (PowerShell)
    $env:QODERCN_PERSONAL_ACCESS_TOKEN="<your token>"
    
  3. Once the variable is set, Qoder CLI CN automatically uses PAT authentication with no browser required.

Invalid or expired token

  • Confirm the value of QODERCN_PERSONAL_ACCESS_TOKEN is complete and correct, with no extra spaces or line breaks.
  • On Windows Command Prompt, do not add quotes when assigning with set — the quotes are stored as part of the variable value. This is a common cause of "the value looks right but authentication fails".
  • After a token is revoked or expires, generate a new one and update the environment variable.
  • If you updated the environment variable but still run under the old identity: authentication reads the QODERCN_PERSONAL_ACCESS_TOKEN environment variable first, which takes precedence over local credentials saved by /login; to use the /login credentials, you must clear that environment variable first.
  • In CI, inject the token through secret variables to avoid committing it in plain text to the repository.

Account and status

  • Run /status to check the current signed-in identity and account status.
  • If it shows you are not signed in, run /login to sign in again.
  • To switch accounts, run /logout first and then /login.
  • If you are currently authenticated via QODERCN_PERSONAL_ACCESS_TOKEN, you must clear that environment variable before /logout; otherwise the next launch automatically signs in with the old token again, which looks like "signed out but the identity did not change".

Authentication network issues

If sign-in requests time out or connections fail, it is usually a network/proxy issue:

Next steps