-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Support COOP same-origin-allow-popups #7408
base: popup-coop-sample
Are you sure you want to change the base?
Conversation
@@ -58,6 +58,7 @@ export type PopupParams = { | |||
export class PopupClient extends StandardInteractionClient { | |||
private currentWindow: Window | undefined; | |||
protected nativeStorage: BrowserCacheManager; | |||
private authChannel: BroadcastChannel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like BroadcastChannel is well supported (https://caniuse.com/broadcastchannel) although not sure if this PopupClient.ts code needs to run in super old contexts. If so, they might want to check if BroadcastChannel doesn't exist and fallback to their URI change polling code. But if this is demo fix for them then probably none of that is necessary anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lg!
Example of using BroadcastChannel to communicate between the same origin across browsing contexts, enabling popup auth flow when the app has a cross-origin opener policy of "same-origin-allow-popups"
*The final solution should ensure the correct InteractionType is used for redirects vs popups and should handle the case where popup window is closed by user