Skip to content

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

@KevinGimbel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions