ruimarinho / gsts

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

added AccountChooser in ssoPage url test #102

Closed roeezab closed 1 year ago

roeezab commented 1 year ago

When the google session times out (or being signed out manually from the accounts settings), google give the "choose an account" page before signing in again:

image

This causes gsts to get stuck on "Logging in" phase, and it needs to be run with --clean argument in order to sign in again, which flaws the interactive way gsts works. I've fixed it by adding AccountChooser to the ssoPage url test, which then identifies this page, and spawns the browser for sign in again.

( The url of the "choose an account" page is something like that: https://accounts.google.com/AccountChooser/signinchooser?continue=https%3A%2F%2Faccounts.google.com%2Fo%2Fsaml2%2Finitsso%3Fidpid%XXXXXX%26spid%XXXXXX%26forceauthn%3Dtrue%26from_login%3DXXXXXX&ltmpl=popup&btmpl=authsub&scc=1&oauth=1&flowName=GlifWebSignIn&flowEntry=AccountChooser )

ruimarinho commented 1 year ago

Thanks! An important fix for sure.