/** * @module identity/sso-popup-helper * * DRY client helper for initiating OAuth2 SSO authentication via a popup window * and capturing the returned authorization code. */ export interface SsoPopupOpts { providerId: 'google' | 'github'; parentTjpAddr?: string; } export interface SsoPopupResult { success: boolean; code?: string; stateObj?: any; redirectUri?: string; message?: string; } /** * Executes an OAuth2 SSO login/link authorization flow using a popup window. * * 1. Queries `GET /api/identity/sso/config` for safe public client configs. * 2. Constructs the provider authorization URL with encoded state payload. * 3. Opens a 600x700 popup window and listens for `sso-oauth-callback` postMessage. * 4. Returns `{ success: true, code, stateObj, redirectUri }` upon authorization. */ export declare function executeSsoOAuthPopup({ providerId, parentTjpAddr, }: SsoPopupOpts): Promise; /** * Checks if the current window was opened as an OAuth popup (`window.opener` exists) * and has received an authorization code in the URL query string (`?code=...`). * If so, posts `sso-oauth-callback` to the parent window and closes itself. */ export declare function checkAndNotifyPopupOpener(): boolean; //# sourceMappingURL=sso-popup-helper.d.mts.map