import type { Auth, OpaqueSession } from '@microsoft/rayfin-auth'; import type { FabricAuthOptions } from './types.js'; /** * Initializes embedded Fabric authentication if running inside an iframe * with `?fabricEmbedded=true`. * * Call this once at app startup (e.g., in a `useEffect` or initialization * routine). It is safe to call on page load — it never opens a popup or * new tab. * * **Behaviour:** * - If `fabricEmbedded=true` is **not** in the URL and `options.fabricEmbedded` * is not `true`, returns `null` immediately (no-op). * - When the host stamps a `?_fu=` hint, runs the standard resume waterfall * (existing session → refresh token → handoff). * - When it does not, skips resume on the first call per page load and goes * straight to the handoff, preserving the pre-hint protection against reusing * a previously signed-in Fabric user's session. * * Apps that also support the popup flow should continue to call * {@link ensureSignedInWithFabric} from a user-gesture handler for the * non-embedded case. * * @param auth - The Auth instance. * @param options - Fabric authentication options. * @returns The authenticated session, or `null` if not in embedded mode. */ export declare function initEmbeddedAuth(auth: Auth, options: FabricAuthOptions): Promise; //# sourceMappingURL=initEmbeddedAuth.d.ts.map