Generates a new PKCE code verifier and challenge pair.
PKCE challenge data including verifier, challenge, and method
Generates a cryptographically secure state parameter for CSRF protection.
The state parameter is used to:
Number of random bytes (default: 32, resulting in 43 chars)
Base64url-encoded state string
Validates that a code verifier meets RFC 7636 requirements.
The code verifier to validate
true if valid, false otherwise
Generates PKCE code verifier and challenge for OAuth 2.1 authorization flows.
Uses cryptographically secure random bytes and SHA-256 hashing per RFC 7636. The code_verifier is 64 characters (48 bytes base64url encoded), providing strong entropy for security.
Example