UNPKG

@dvcol/common-utils

Version:

Typescript library for common utility functions and constants

17 lines (15 loc) 800 B
declare const randomHex: (n?: number) => string; declare const getCodeVerifier: (length?: number) => Promise<string>; declare const getCodeChallenge: (verifier: string) => Promise<string>; declare const verifyCodeChallenge: (codeVerifier: string, codeChallenge: string) => Promise<boolean>; declare class PKCECodeGenerator { static readonly code: (length?: number) => Promise<string>; static readonly challenge: (verifier: string) => Promise<string>; static readonly verify: (codeVerifier: string, codeChallenge: string) => Promise<boolean>; static codes(length?: number): Promise<{ verifier: string; challenge: string; verify: () => Promise<boolean>; }>; } export { PKCECodeGenerator, getCodeChallenge, getCodeVerifier, randomHex, verifyCodeChallenge };