Ancestor violates Content Security Policy directive: "frame-ancestors 'none' when connecting with Cypress

I have been trying to integrate Cypress in our React application that uses Auth0. When I run a simple test through Cypress, I get an error saying “Refused to frame ‘https://domain.auth0.com/’ because an ancestor violates the following Content Security Policy directive: “frame-ancestors ‘none’”.” I have followed the following links for implementation and debugging:
End-to-End Testing with Cypress and Auth0 - #31 by jonathan.dudley
End-to-End Testing with Cypress and Auth0

I tried the same with Protractor which uses Selenium and that worked just fine. Let me know what I can do to fix this error.
I have followed instructions given here but wasn’t able to get it to work.

Any help would be great help because I want to use Cypress instead of Protractor and I’m not sure who can help me with this.

2 Likes

Facing the same issue. @sankalan Did you have any luck in resolving this?

Hi, any update on this issue? am facing the same issue. Tried configuring “Disable clickjacking protection for Classic Universal Login” from Tenant admin settings. But it didn’t work.

If I acceess using public IP it works fine. But if I use domain name, am getting below error.

"Refused to frame ‘https://*******.us.auth0.com/’ because an ancestor violates the following Content Security Policy directive: “frame-ancestors ‘none’”

I have the same issue, attempting to log in using an iFramed loginWithRedirect in React app inside of a Microsoft add-in.

Refused to frame ‘https://***.com/’ because an ancestor violates the following Content Security Policy directive: “frame-ancestors ‘none’”.

I’ve also disabled clickjacking as mentioned in related posts, to no avail.

This is preventing me from developing add-ins as it is required to log in using Microsoft’s displayDialogAsync, which will inevitably open the Auth0 login page within an iFrame.

Hello there, has anyone find a solution for this?
We are trying to create a MS Teams tab application and encounter de same problem.

Thx