oidc-client-ts icon indicating copy to clipboard operation
oidc-client-ts copied to clipboard

Signin with PopUp when inside an IFrame doesnt work.

Open thejurassic opened this issue 1 year ago • 1 comments

I’m running my app within an IFrame, as it’s embedded in the Microsoft Dynamics sidebar. I'm using SignInPopup for authentication, but I’m encountering issues due to how the token is returned to the calling window.

Currently, the popup window returns the token to the calling IFrame via storage, which is blocked by browser security settings in IFrame contexts. For this setup, the token should ideally be sent back to the calling IFrame using the browser's postMessage API instead of relying on storage.

Is there an existing configuration or workaround for this? If not, could support for window messaging be considered in a future update? Given the comprehensive nature of this library, I’m hoping I might be overlooking a solution here.

thejurassic avatar Nov 21 '24 23:11 thejurassic

all IFrame access cookie will be restricted by browser in different ways. These is nothing we can do but the IFrame which created can allows to call Storage Access APIs which can ask for cookie access. More elaborate on IFrame Silent Renew with 3rd party cookie in Firefox PoC is done https://github.com/authts/oidc-client-ts/issues/1735 unfortunately the maintainers do not have time to have a look

deanmaster avatar Dec 02 '24 11:12 deanmaster