import type { ResolvedConfig } from '../types/index.js'; /** * Run the PKCE login flow: * - desktop: opens an `/authorize` popup, waits for the auth code via * postMessage (or `/auth/token/poll` fallback), then exchanges it. * - mobile / blocked popup: full-page redirect to `/authorize`. The result * is picked up by `consumeAuthCodeFromUrl` on the next page load. * * Concurrent calls (e.g. paywall + comments both triggering login) share a * single in-flight attempt. */ export declare function login(config: ResolvedConfig): Promise; /** * Check the current URL for `cc_auth_code`/`cc_state` (set by `/authorize`'s * redirect-back fallback for the mobile flow and COOP-severed popups), scrub * them, and exchange the code for tokens if it matches our pending PKCE * verifier. * * If we're running inside a popup whose opener is reachable, notify it and * close — this covers the case where a COOP-severed popup navigated itself * back to the article URL with the code while the opener is still polling. */ export declare function consumeAuthCodeFromUrl(config: ResolvedConfig): Promise;