UNPKG

@nhost/nhost-js

Version:

Nhost JavaScript SDK

22 lines 731 B
/** * PKCE (Proof Key for Code Exchange) utilities for RFC 7636. * * These functions use the Web Crypto API (`globalThis.crypto`), which is * available in all modern runtimes: browsers, Node.js >= 19, Bun, and Deno. */ /** * Generate a cryptographically random PKCE code verifier (43 base64url characters). */ export declare function generateCodeVerifier(): string; /** * Derive a S256 code challenge from a code verifier. */ export declare function generateCodeChallenge(verifier: string): Promise<string>; /** * Generate a PKCE code verifier and its S256 challenge in one call. */ export declare function generatePKCEPair(): Promise<{ verifier: string; challenge: string; }>; //# sourceMappingURL=pkce.d.ts.map