/** * Auto-executing popup callback handler * * This module automatically handles OAuth popup callbacks when imported. * Use this in your callback page instead of manually creating callback.html: * * Option 1: Import in your callback page (React/Next.js/Vue) * ```tsx * // app/callback/page.tsx or pages/callback.tsx * import '@authway/client/popup-callback' * ``` * * Option 2: Add as a script tag * ```html * * ``` * * This will: * 1. Detect if the page is running in a popup with OAuth params * 2. Send the auth result to the parent window via postMessage * 3. Close the popup automatically * 4. If not in popup mode, do nothing (let your app handle redirect flow) */ /** * Manually handle popup callback * Returns true if this page is a popup callback and was handled */ declare function handlePopupCallback(): boolean; /** * Check if current page is a popup callback * Useful for conditional rendering in callback pages */ declare function isPopupCallback(): boolean; export { handlePopupCallback, isPopupCallback };