SAML Login - Any Easy Method? Working #28384
Unanswered
manu-remsense
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey guys,
I'm using Cognito for identity federation, which uses Microsoft as IdP with SAML type of authentication. I've been having massive issues in trying to get E2E test with authentication to work.
My web app basically checks the cookies of the request, and if the request doesn't contain valid cookies, it redirects to AWS cognito endpoint, which then redirects to a Microsoft login. Upon successful login, it then redirects back to the app.
I've tried using this guide,
https://docs.cypress.io/guides/end-to-end-testing/azure-active-directory-authentication
Which doesn't work due to the login.microsoftonline.com page not loading. The error states,
Failed to find a valid digest in the 'integrity' attribute for resource '<URL>' with computed SHA-384 integrity '<sha-384 code here>'. The resource has been blocked.
As a result it causes the following error,
Uncaught [Retry 0] Failed to load external resource ['https://aadcdn.msftauth.net/shared/1.0/content/js/ConvergedLogin_PCore_LRl_HOP41vTvA9IKhSqNsg2.js'], reloading from fallback CDN endpoint
Then I decided to implement login flow programmatically, from my research it seems that SAML authentication is hard to set up without the browser. I've briefly tried just now, but not too successful yet, it seems a bit challenging as I have to reverse-engineer how microsoft's login works.
Is there any easy way of setting this up? Anyone had any success with SAML authentication with Cypress? I've tried looking all over online, but nothing useful so far. Any help would be appreciated..
Thanks,
Manu
Beta Was this translation helpful? Give feedback.
All reactions