UNPKG

@azure/msal-browser

Version:
41 lines • 1.87 kB
import { IPerformanceClient, Logger } from "@azure/msal-common/browser"; import type { WaitForBridgeRequest } from "../utils/BrowserUtils.js"; /** * The navigation the popup-relay page should perform in its IdP child popup: * either a GET navigation to a URL, or a POST form submission (used by the * form_post and EAR response modes). * * @internal */ export type PopupRelayAction = { method: "GET"; url: string; } | { method: "POST"; action: string; fields: Record<string, string>; }; /** * Builds the same-origin relay URL. V1 preserves the fragment descriptor; * explicitly selected v2 carries only the id and retains the navigation for * the authenticated handoff. * * @internal */ export declare function buildPopupRelayUrl(popupRelayUri: string, id: string, action: PopupRelayAction, correlationId: string, protocolVersion?: 1 | 2): string; /** * Waits for the popup-relay page to relay the raw auth response back to the * embedded frame via postMessage. Used in place of `waitForBridgeResponse` * when `auth.popupRelayUri` is configured, because third-party storage * partitioning blocks the BroadcastChannel the redirect bridge uses from * reaching the embedded frame. * * In v2, the retained navigation is sent once, after a ready signal from the popup * window we opened on our own origin with the matching library-state id. * Successful responses must also carry that handoff's relay-document nonce. * Setup failures can reject the request before the handoff completes. * * @internal */ export declare function waitForPopupRelayResponse(timeoutMs: number, logger: Logger, request: WaitForBridgeRequest, popupWindow: Window, performanceClient: IPerformanceClient, action?: PopupRelayAction, protocolVersion?: 1 | 2): Promise<string>; //# sourceMappingURL=relayClient.d.ts.map