oauth2cli icon indicating copy to clipboard operation
oauth2cli copied to clipboard

oauth2cli does not support custom paths

Open MakerTim opened this issue 2 years ago • 1 comments

Context

I'm working with a keycloak & oidc workflow and I use kubelogin My workflow forces me to run kubectl inside a docker container. Now i need routing to let my browser connect to the oauth2cli server. I tried to use domains for this, since that is the easiest and least trouble. But in Keycloak you can only configure wildcards on paths and not on (sub) domains. But you can configure wildcards on paths. So im trying to make my kubelogin to use a path, but there are no options for that.

Digging into the code, I found that it uses oauth2cli for the local server. And we are hardcoding the path to be always at the root / https://github.com/int128/oauth2cli/blob/master/server.go#L118C20-L129

Feature Request

Could we make a config for that / Make a PR for that so we can have a option to overwrite/set the path? Or are there any (security)concerns for this request?

Kind Regards, Tim

MakerTim avatar May 16 '23 08:05 MakerTim

I noticed that https://github.com/int128/oauth2cli/pull/117 has already a PR

MakerTim avatar May 16 '23 08:05 MakerTim