Skip to content

stackit auth login fails if something already runs on localhost:8000 #1250

Closed

Description

@KevinGimbel

Description

When running something on localhost:8000 the stackit auth login command gets stuck.

Steps to reproduce

  1. Run something on localhost:8000
  2. Run stackit auth login
  3. Browser opens, goes to the app already running on localhost:8000, stackit cli is stuck

Actual behavior

The terminal reads the following and nothing happens:

Your browser has been opened to visit:

https://accounts.stackit.cloud/oauth/v2/authorize?<loads-of-stuff>&redirect_uri=http%3A%2F%2Flocalhost%3A8000&<more-stuff>

This doesn't always happen which is curious.

I tried to block the port with a simple python server by running python3 -m http.server, but then stackit CLI used another port (8001) as I would've expected.

When I run a static site generator such as Zensical, the oauth flow gets stuck as described above, and no alternative port is chosen.

Expected behavior

I expect stackit cli to reliably fallback to a different port if 8000 is occupied.

Environment

  • OS: MacOS 26
  • Version of STACKIT CLI (see stackit --version): 0.51.0

Activity

  1. KevinGimbel commented on Jan 23, 2026

    @KevinGimbel
    ContributorAuthor

    I noticed there's a newer version https://github.com/stackitcloud/stackit-cli/releases/tag/v0.52.0 but this one is not yet in nixpkgs so I cannot get it yet.

    From the release notes it doesn't look like it fixes my issue.

  2. marceljk commented on Mar 19, 2026

    @marceljk
    Contributor

    Hi @KevinGimbel,

    this issue was solved in #1251 and will be part of our next release. We also add a flag --port to the $ stackit auth login command, where you can choose one port of the range 8000-8020, which will be used for the callback.

    Best regards
    Marcel from the STACKIT Developer Tools Team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions