auth0 / auth0-react

Auth0 SDK for React Single Page Applications (SPA)
MIT License
887 stars 256 forks source link

Content Security Policy directive: "frame-ancestors 'none' When Using getAccessTokenSilently with Auth0 #783

Open parth25 opened 3 months ago

parth25 commented 3 months ago

Checklist

Description

When we attempt to get a token using getAccessTokenSilently after a session has expired, we receive the following error:

Refused to frame 'https://****.uk.auth0.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'none'

Repository:

https://github.com/parth25/pos-react-auth0

clipboard

imgpsh_fullsize_anim (2)

Reproduction

  1. Allow the user session to expire.
  2. Call getAccessTokenSilently to retrieve a new access token.
  3. Observe the error in the console.

Additional context

We are using Universal Login for our Auth0 setup. This issue appears to be related to the Content Security Policy settings of our Auth0 tenant. The frame-ancestors 'none' directive is preventing the request.

auth0-react version

2.2.4

React version

18.2.0

Which browsers have you tested in?

Chrome, Firefox