/** * PKCE (Proof Key for Code Exchange) utilities * RFC 7636: https://datatracker.ietf.org/doc/html/rfc7636 */ /** * Generate a cryptographically random code verifier * Must be 43-128 characters long, using [A-Z][a-z][0-9]-._~ */ export declare function generateCodeVerifier(): string; /** * Generate code challenge from verifier using S256 method * code_challenge = BASE64URL(SHA256(ASCII(code_verifier))) */ export declare function generateCodeChallenge(verifier: string): string; /** * Generate a random state parameter for CSRF protection */ export declare function generateState(): string; /** * PKCE parameters for authorization flow */ export interface PKCEParams { codeVerifier: string; codeChallenge: string; state: string; } /** * Generate all PKCE parameters needed for authorization */ export declare function generatePKCEParams(): PKCEParams; //# sourceMappingURL=pkce.d.ts.map