UNPKG

@aws-amplify/auth

Version:
17 lines (16 loc) 618 B
/** * * @param length Desired length of the code verifier. * * **NOTE:** According to the [RFC 7636](https://datatracker.ietf.org/doc/html/rfc7636#section-4.1) * A code verifier must be with a length >= 43 and <= 128. * * @returns An object that contains the generated `codeVerifier` and a method * `toCodeChallenge` to generate the code challenge from the `codeVerifier` * following the spec of [RFC 7636](https://datatracker.ietf.org/doc/html/rfc7636#section-4.2). */ export declare const generateCodeVerifier: (length: number) => { value: string; method: "S256"; toCodeChallenge(): string; };