stackitcloud/stackit-cli

Feat: Retry other ports if 8000 is occupied for `stackit auth login`

Closed this issue · 2 comments

Hello,
stackit auth login needs to open a webUI on localhost:8000. If this port is occupied it fails with:

Error: authorization failed: listen to port :8000: listen tcp :8000: bind: address already in use

I now had to disable my development resources disrupting my workflow. A retry loop trying different ports would be convenient.
If you want that as a contribution let me know!

Hey @PeterStolz,
You are right, we should implement this, that's something that we already had considered but didn't get to do yet.

Your contribution would be most welcome!

+1 on this.

I tried implementing it on a random port. But the authentication doesn't work on other ports than 8000.
This is configuration of the oauth client.