-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow redirects to external authentication providers #1489
Comments
You can already do this by turning off You can search the issues here for even more answers to this question.
|
Hey @brian-mann Can I ask why this is considered bad practise? I'm currently having this issue, when visiting our landing page it will redirect you to login if you haven't already. Cypress is not loading this redirected page. Is there anyway of accessing this redirect page other than sending an api request? The redirected page is completely within our control, and sending an api request to login is not reflective of our user journey. Thanks |
I'm currently evaluating different e2e/integration testing tools and really love Cypress for its command log and easiness of debugging. After the first impression, I was excited to convince my team to use it in our project. Unfortunately, I failed to authenticate with OKTA SSO due to #1321. In the meantime, I tried TestCafe and it took me literally like 3 minutes to successfully log in to my app with 3 redirects without disabling chromeWebSecurity. I'm wondering what blockers are preventing Cypress from allowing to accomplish the same scenario without so much additional work presented in SSO recipe. We will probably stick with TestCafe for now but I will definitely check whether anything has changed regarding this issue since I definitely prefer Cypress' approach. |
One of the primary areas of our apps that we would want to test in an automated fashion is the SSO redirect. We also use OKTA and Open ID Connect. I would hope that you would reconsider this issue to find a solution. |
Same. Found this thread doing research to be sure we'd be able to use our Enterprise Okta SSO. Am I wrong in assuming this isn't supported? |
Any updates on this? If a |
I'm also having issue with OKTA and can't login at all into our app URL. So is it possible at all? |
@jeffradom @rodoabad @owenmecham Please open an issue detailing the exact code to reproduce the OKTA issue so we can look at the exact mechanisms that are involved. |
@jennifer-shehane I've already done that with maximum details I had. |
here is a link to a bug #4416 |
User of Google IDaaS and former OKTA user here. Also hit by this issue which prevents us from using Cypress altogether because the site is 100% authenticated behind SAML. |
We use OIDC/OAuth 2.0 and I'm facing the same problems. I can't use the provided recipes because there is no simple login page. The app redirects to the login-page with a nonce, code, code-verifier and what not. I'm fine with working around our login-flow to test the app, but still haven't found a way to do so. |
Someone has created a custom OKTA login command that may be useful here: https://gist.github.com/ndavis/2c84ab40aaa3c98c3a8062bdb3938232 |
For those using Auth0 you can follow this guide and also use this repo which works! https://auth0.com/blog/end-to-end-testing-with-cypress-and-auth0/ |
@rienheuver Did this work for you? I am running into same issue as yours and wanted to check if it was resolved. |
@trips11 I built a workaround to get things to work which I explain here: #944 (comment) |
anyone has a working example for authentication with IdentityServer4? |
Is this okta login issue resolved for any one.I am also facing the same issue..okta login page not loding in Cypress controlled browser |
@rinshadkt as I understood it is a choice of Cypress not to allow to load external/different domains, so it is not an issue. After some time trying to figure it out with Cypress, moved to TestCafe where you can easily load different domains and it was good enough for me for all my needs. |
i tried to use the one you referenced to, but it still changes domains |
I might be a bit late to the party, but you can try This is for v11.x
I almost moved to TestCafe I must say 😆 |
Hi @thomsa , I have the same issue, but adding that line |
The experimentalSessionAndOrigin configuration option was removed in Cypress version 12.0.0.
|
cy.origin and cy.session are built into Cypress now. We recommend using these commands to test auth providers if you need. There are some examples of testing auth providers here in this section: https://docs.cypress.io/guides/end-to-end-testing/amazon-cognito-authentication |
Current behavior:
We use an internal SSO implementation based on OpenID Connect, using redirect flows to authenticate. Cypress does not currently allow the redirect to the 'external' page to login.
Desired behavior:
Cypress could be configured to allow redirects to other domains when necessary. Maybe this could be a configurable whitelist?
I think the current default behaviour is good, but would like to see the option to bypass it.
The text was updated successfully, but these errors were encountered: