Skip to main content
Troubleshooting

Sign-in and Authentication Issues

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

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

Browser Callback Failure

Browser-based sign-in opens an authorization page and redirects back to the local environment upon completion. If it gets stuck waiting for the callback:
  • Ensure the browser has successfully opened the authorization page and that authorization is complete.
  • In environments without a graphical interface (CI, SSH sessions without DISPLAY, BROWSER=www-browser, etc.), Qoder CLI automatically skips launching the browser, and the sign-in screen itself prints a copyable Sign-in URL—just open that URL manually in a browser.
  • Alternatively, select the option to use a Qoder Personal Access Token in the /login sign-in method, and paste the token directly to complete authentication.
  • 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 try again.
  • After completing authorization, manually switch back to the terminal and wait for the authentication status to refresh.

Browserless Environment Login

In CI/CD environments or on servers without a browser, use PAT authentication:
  1. Generate a Personal Access Token in Qoder Integrations.
  2. Provide it via an environment variable:
    # Linux / macOS
    export QODER_PERSONAL_ACCESS_TOKEN="<your token>"
    
    # Windows (Command Prompt). Note: Do not add quotes, as CMD will store the quotes in the variable value.
    set QODER_PERSONAL_ACCESS_TOKEN=<your_token>
    
    # Windows (PowerShell)
    $env:QODER_PERSONAL_ACCESS_TOKEN="<your token>"
    
  3. Once this variable is set, Qoder CLI will automatically use PAT authentication without requiring a browser.

Invalid or Expired Token

  • Ensure the value of QODER_PERSONAL_ACCESS_TOKEN is complete and correct, with no extra spaces or line breaks.
  • When assigning a value using set in the Windows Command Prompt, do not use quotes; otherwise, the quotes will be included in the variable value. This is a common cause of "the value looks correct but authentication fails."
  • If a token is revoked or expires, you must regenerate it and update the environment variable.
  • If you updated the environment variable but are still running under the old identity: authentication reads the QODER_PERSONAL_ACCESS_TOKEN environment variable first, which takes precedence over the local credentials saved by /login; to use the /login credentials, you must clear this environment variable first.
  • In CI environments, inject the token via secret variables to avoid committing it in plaintext to the repository.

Account and Status

  • Run /status to check the current sign-in identity and account status.
  • If it shows you are not signed in, run /login to sign in again.
  • To switch accounts, first run /logout and then /login.
  • If you are currently authenticated via QODER_PERSONAL_ACCESS_TOKEN, you must clear this environment variable before running /logout; otherwise, the next startup will still automatically sign in with the old token, resulting in a "signed out but identity unchanged" behavior.

Authentication Network Issues

If the sign-in request times out or the connection fails, it is usually a network/proxy issue:

Next Steps