Skip to content

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

Closed
@parth25

Description

@parth25

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions