Skip to content

feat(auth): add no browser open flag to login - #1602

Open
niri81 wants to merge 2 commits into
stackitcloud:mainfrom
niri81:feat/login-without-browser-open
Open

niri81 wants to merge 2 commits into
stackitcloud:mainfrom
niri81:feat/login-without-browser-open

Conversation

@niri81

@niri81 niri81 commented Sep 14, 2026

Copy link
Copy Markdown

Description

Add an additional option to only print the authorization URL and not open it directly in the standard browser. Especially useful if another browser or an incognito tab need to be used to sign-in with different accounts and bypass automatic SSO login.

Checklist

  • Issue was linked above
  • Code format was applied: make fmt
  • Examples were added / adjusted (see e.g. here)
  • Docs are up-to-date: make generate-docs (will be checked by CI)
  • Unit tests got implemented or updated
  • Unit tests are passing: make test (will be checked by CI)
  • No linter issues: make lint (will be checked by CI)

Add an additional option to only print the authorization URL and not
open it directly in the standard browser. Especially useful if another
browser or an incognito tab need to be used.
@niri81
niri81 requested a review from a team as a code owner September 14, 2026 09:27
@github-actions

Copy link
Copy Markdown

This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it.

@github-actions github-actions Bot added the Stale label Sep 23, 2026
@niri81

niri81 commented Sep 23, 2026

Copy link
Copy Markdown
Author

Review pending, not stale

@github-actions

Copy link
Copy Markdown

This PR was marked as stale after 14 days of inactivity and will be closed after another 14 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it.

@github-actions github-actions Bot added the Stale label Oct 15, 2026
@niri81

niri81 commented Oct 15, 2026

Copy link
Copy Markdown
Author

Hi, any update on this?

@rubenhoenle rubenhoenle removed the Stale label Oct 15, 2026
Comment on lines +262 to +263
p.Info("Open the following URL in your browser:\n\n")
p.Info("%s\n\n", authorizationURL)

@cgoetz-inovex cgoetz-inovex Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
p.Info("Open the following URL in your browser:\n\n")
p.Info("%s\n\n", authorizationURL)
p.Noticeln("Open the following URL in your browser:\n")
p.Outputf("%s\n\n", authorizationURL)

p.Info only prints to StdErr for verosities: debug and info -> stackit auth login --no-browser-open --verbosity error would not print the URL. The suggestion always prints URL.

The p.Noticeln is new, you'll need to merge main into your branch as soon as #1675 is merged

@cgoetz-inovex

Copy link
Copy Markdown
Contributor

Hi @niri81,
thanks for your contribution and sorry for the late review. I've tested your branch locally and added a suggestion.
I'll request a 2nd review from our team.
Have a nice day!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants