I didn't really know how the login flow worked so it was made through network request observations and subsequent trial and error:
At the end of the SAML login, a request to the same page is made which returns 302 to the AWS Console, and sets some cookies to the .aws.amazonaws.com domain. Just intercepting this 302 and setting those cookies in the desired container's cookie store is enough to get authentication to work.
In the process I ended up converting prepareContainer to an async function and anything that uses it as needed, so there were these two additional changes. I don't have an AWS SSO flow available to test if that's till working fine, but the changes are very straightforward so it should be.
If you'd rather not have these changes (the async part), tell me and I can keep it as it was.
Closes #11.
I didn't really know how the login flow worked so it was made through network request observations and subsequent trial and error: At the end of the SAML login, a request to the same page is made which returns 302 to the AWS Console, and sets some cookies to the .aws.amazonaws.com domain. Just intercepting this 302 and setting those cookies in the desired container's cookie store is enough to get authentication to work.
In the process I ended up converting
prepareContainer
to an async function and anything that uses it as needed, so there were these two additional changes. I don't have an AWS SSO flow available to test if that's till working fine, but the changes are very straightforward so it should be.If you'd rather not have these changes (the async part), tell me and I can keep it as it was.