Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for Third Party Storage Partitioning #1202

Open
szahn opened this issue Oct 11, 2023 · 4 comments
Open

Workaround for Third Party Storage Partitioning #1202

szahn opened this issue Oct 11, 2023 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@szahn
Copy link

szahn commented Oct 11, 2023

There is a new feature in browsers called Storage Partitioning which prevents iframes in pages that rely on a login popup to authenticate. Logging into an identity provider via a popup window from an iframe within a host window causes browser storage partitioning to break the authentication flow. For example, when developing a Microsoft Teams Tab single page application, and logging into a third party identity provider with OAuth 2.0 Authorization Code PKCE flow from a popup window, breaks the process. Disabling this feature via chrome://flags/#third-party-storage-partitioning seems to resolve it in Chrome but not in Chromium or other browsers. This issue seems to affect other applications, including PowerBI embedding. There are some workarounds such as using url parameters or postMessage mentioned in this article. It would be great if there was an option to use a state provider that did not rely on partitioned storage somehow.

@szahn szahn changed the title Workaround for Storage Partitioning Workaround for Third Party Storage Partitioning Oct 11, 2023
@miketaylr
Copy link

There is a new feature in browsers called Storage Partitioning which prevents iframes in pages that rely on a login popup to authenticate

Note that this behavior has shipped in Safari and Firefox for quite some time - Chrome is just catching up. How does this library work in those browsers?

@szahn
Copy link
Author

szahn commented Oct 12, 2023

We found a temporary workaround by using postMessage to send the oidc session from the storage in the popup back to the iframe in the host window. However, it would be ideal if the library would have built-in support for partitioned storage.

@pamapa
Copy link
Member

pamapa commented Oct 16, 2023

@szahn Can you post the workaround here? And it would be nice if you can provide support for this via a merge request.

@pamapa pamapa added enhancement New feature or request help wanted Extra attention is needed labels Oct 16, 2023
@deanmaster
Copy link

hi @szahn it would be great if you can post workaround here and perfectly as @pamapa said if you provide with merge request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants