@criipto/oidc
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -30,2 +30,4 @@ "use strict"; | ||
const bytes = crypto.getRandomValues(new Uint8Array(32)); | ||
if (bytes === null || bytes.byteLength === 0) | ||
throw new Error('crypto.getRandomValues returned null/no bytes'); | ||
const code_verifier = base64URLEncode(bytes); | ||
@@ -35,2 +37,6 @@ const code_challenge_method = 'S256'; | ||
const code_challenge = base64URLEncode(new Uint8Array(buffer)); | ||
if (!(code_verifier === null || code_verifier === void 0 ? void 0 : code_verifier.length)) | ||
throw new Error('Unable to generate PKCE, code_verifier blank'); | ||
if (!(code_challenge === null || code_challenge === void 0 ? void 0 : code_challenge.length)) | ||
throw new Error('Unable to generate PKCE, code_challenge blank'); | ||
return { code_verifier, code_challenge, code_challenge_method }; | ||
@@ -37,0 +43,0 @@ }); |
{ | ||
"name": "@criipto/oidc", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27031
379