Preview mode: triggering an external logic (OIDC)

Hi all,

I’m having some issue triggering an external login to an OIDC while in preview mode.

The provider has the frame-ancestors 'self' policy which blocks the request coming from inside the iframe. Is it possible to add allow-top-navigation-by-user-activation to the preview iframe?

Hi @gamadori

Welcome to the forum!

Are you not able to authenticate before entering preview mode, would that not work for you?

Justin

Hi Neville,

Yes I could authenticate before entering preview and we’re are currently using this workaround. I was hoping in a more permanent solution.

Hi @gamadori

The frame options are hard-coded here:

Is that definitely your issue and not something else blocking your auth flow? Do you get any errors or warnings in the console?

Justin

Hi Justin,

In the console I see this
Content-Security-Policy: The page’s settings blocked the loading of a resource (frame-ancestors) at because it violates the following directive: “frame-ancestors 'self'”

I’ve done a lot of debugging and from what I’ve discovered the provider block its own login page from being framed by anything other that its own origin.

Hi @gamadori

Are you applying your own CSP that could be blocking this?

Justin