Earnest-Labs / aws-sts

Generation of AWS STS tokens via SAML authentication.
67 stars 18 forks source link

Help with a new provider? #8

Open deinspanjer opened 8 years ago

deinspanjer commented 8 years ago

I've spent too long now trying to get a Google for Work SAML provider working with this.

Using docs on the web, I was able to get SSO going without too much trouble and can use it to open the AWS console from a real browser, but I just haven't been able to get Nightmare to be able to do the full authentication path.

I was hoping someone might be able to take a look at this non-working code and give me any tips?

https://github.com/deinspanjer/aws-sts/blob/d7a6891c366346fdcf6f413db6a8442f333d20e6/src/providers/gfw.js

bromanko commented 8 years ago

Where does the full authentication path fail?

deinspanjer commented 8 years ago

It doesn't seem to notice when the second page that asks for the password has loaded. It just returns an error saying that Cannot read property 'blur' of null

bromanko commented 8 years ago

It's likely that the wait command is waiting on something that doesn't change or ever load. For instance, this wait on body could be falsely indicating the next page has loaded if all modifications to the DOM happen client side (no page refresh). If Nightmare can't find the password field to attach the handler I could see an error like above being generated. Try a different wait condition.