cevoaustralia / aws-google-auth

Provides AWS STS credentials based on Google Apps SAML SSO auth (what a jumble!)
MIT License
537 stars 181 forks source link

Default value of parameter `bgresponse` has not accepted. #160

Open max-rocket-internet opened 4 years ago

max-rocket-internet commented 4 years ago

Some of us are getting this message:

Google Password: 
Default value of parameter `bgresponse` has not accepted.
                Please visit login URL https://accounts.google.com/o/saml2/initsso?idpid=C00pn5t3o&spid=112173148568&forceauthn=false, open the web inspector and execute document.bg.invoke() in the console.
                Then, set --bg-response to the function output.

But running that in the JS console is not possible, it gives an error.

  1. Are we supposed to run that command at the Google account selector screen? Or another point?
  2. Is it possible to get this value from the source code of the page?
max-rocket-internet commented 4 years ago

@stevemac007 it says:

This setting is not available for accounts with 2-Step Verification enabled. Such accounts require an application-specific password for less secure apps access.

I imagine most users of aws-google-auth are using 2FA.

bryceml commented 4 years ago

https://addons.mozilla.org/en-US/firefox/addon/saml-to-aws-sts-keys/ seems to work as a work-around/alternative.

pauldraper commented 4 years ago

I posted this earlier, but I believe fooling anti-robot measures to be whack-a-mole.

Instead, I use SAML Response browser extension in conjunction with --saml-assertion or aws-cli-saml.

Mahdi-Hosseinali commented 3 years ago

I'm getting this error on v0.0.37, it asks the password and then throws this error instead of requesting a captcha. Was working up until yesterday.

UPDATE If your admin has forced the MFA and you don't have it on your account, then you'll get this error. Basically, if the error is not known to the library, you most likely get this one. Try to login using incognito mode, fix all the issues, then it probably works in your terminal as well.