createCodeChallenge
Documentation / @discordeno/utils / createCodeChallenge
Function: createCodeChallenge()
createCodeChallenge(
verifier):Promise<string>
Defined in: packages/utils/src/oauth2.ts:53
Creates a code challenge from the code verifier using the specified method.
Parameters
verifier
string
The code verifier to use.
Returns
Promise<string>
The code challenge.
Remarks
This performs a SHA-256 hash on the verifier and encodes it using base64url encoding. Discord only supports 'S256' as the code challenge method.