MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / reserveOAuthPopup

Function reserveOAuthPopup

packages/react/src/api/oauth-popup.ts:69–80  ·  view source on GitHub ↗
(input: {
  readonly popupName: string;
  readonly width?: number;
  readonly height?: number;
})

Source from the content-addressed store, hash-verified

67};
68
69export const reserveOAuthPopup = (input: {
70 readonly popupName: string;
71 readonly width?: number;
72 readonly height?: number;
73}): ReservedOAuthPopup | null => {
74 const popup = window.open("about:blank", input.popupName, oauthPopupFeatures(input));
75 if (!popup) return null;
76 // Keep opener available for the same-origin callback page. Browser
77 // BroadcastChannel delivery can be partitioned in popup flows, so the
78 // callback's postMessage path is the primary completion signal.
79 return { popup };
80};
81
82/**
83 * Open a centered popup window at `url` and resolve when the popup posts

Callers 3

useOAuthPopupFlowFunction · 0.90
openOAuthPopupFunction · 0.85

Calls 1

oauthPopupFeaturesFunction · 0.85

Tested by

no test coverage detected