Set callback/redirect URL on SSO login flow from CLI
Checklist
- [x] I've searched the issue queue to verify this is not a duplicate feature request.
- [ ] I've pasted the output of
kargo version, if applicable. - [ ] I've pasted logs, if applicable.
Proposed Feature
We would like to have the ability to overwrite the callback/redirect URL via Kargo CLI.
It's currently hardcoded to use localhost here - https://github.com/akuity/kargo/blob/main/pkg/cli/cmd/login/login.go#L328
kargo login https://kargo.example.com --sso --callback <redirect-url>
Motivation
Some users using IDE environments that can't resolve localhost or 127.0.0.1 or users with custom OIDC solutions aren't able to login with Kargo CLI.
There was a similar feature added to Argo CD CLI recently - https://github.com/argoproj/argo-cd/issues/22738
Initially was writing this off as too niche, regardless of whether Argo CD supports it, but I think the thing that was not initially registering was that this:
Some users using IDE environments that can't resolve localhost or 127.0.0.1
Was (maybe?) referring to a web based IDE running in a browser?
That's less "out there" than I'd initially been thinking. Still want other maintainers to weigh in.
Had some offline discussion with @csz-akuity. Enabling a --callback flag for customizing the callback URL is easy to do, but what we have no (universal) way of doing is making the CLI serve requests to that callback URL in order to complete the authorization code flow. Making that work would require either that every user modifies their /etc/hosts file or alternatively requires some DNS trickery. (e.g. Something like an A record pointing oauth-callbacks.example.com to 127.0.0.1.
In the end, we agreed that the value proposition of this feature is in question at this time.
We will reopen this if that changes.