generateCodeVerifier
Mô tả
This function generates a high-entropy cryptographic random string used as the code verifier in the PKCE (Proof Key for Code Exchange) flow for OAuth 2.0 authorization.
Parameters
Return Value
Param | Data type | Description |
---|---|---|
codeVerifier | string | A high-entropy cryptographic random string used as the code verifier. |
Error Code
Sample Code and Sample Return Data
Sample Request:
window.zlpSdk.User
.generateCodeVerifier()
.then((response) => console.log(response))
.catch((error) => console.error(error.errorCode));
Sample Response:
{
"status": "success",
"data": {
"codeVerifier": "dkulv6iNthq8zWWpXKOsKqTlS0_VsLSfMnY2LCW4.Lz"
}
}