ruimarinho / gsts

Obtain and store AWS STS credentials to interact with Amazon services by authenticating via G Suite SAML.
MIT License
212 stars 37 forks source link

Add option to copy URL instead of opening browser automatically #64

Open bentsherman opened 2 years ago

bentsherman commented 2 years ago

I use WSL, so GUI support is clunky. I got it to work, but I would like to be able to just copy the authentication URL into my native browser instead of gsts trying to open a browser automatically. Google Cloud's gcloud does this for example.

Would it be possible to implement this flow, enabled by a command line option?

ruimarinho commented 1 year ago

@bentsherman while still writing to the credentials file, right? I'd need to do some research as I'm not sure how to capture those details outside the running context. You're not looking for gsts console, are you?

bentsherman commented 1 year ago

It looks like gsts console also opens a browser window. I just want it to print a URL, then I open to that URL myself, authenticate, and gsts captures that event somehow and proceeds.

I see what you mean that the "somehow" part might be tricky. I don't know how gcloud does it, it might use internal APIs that this tool can't access.

In any case, I think it's worth a cursory investigation to see if it's possible, but it's not an urgent issue. I just run an X server in the background, and most of the time gsts can log me in without opening a browser anyway.

manugarri commented 1 year ago

@ruimarinho would it be possible to have the gsts console browser logic (that works without an xserver) implemented in the regular gsts login?