Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

chore: method signatures for pkceChallengeFromVerifier method

jamesgeorge007a4b89a2152da
diff --git a/assets/js/oauth.js b/assets/js/oauth.js
index 9b50a0952..fdbe1c7f7 100644
--- a/assets/js/oauth.js
+++ b/assets/js/oauth.js
@@ -114,7 +114,14 @@ const base64urlencode = (
.replace(/\+/g, "-")
.replace(/\//g, "_")
.replace(/=+$/, "");
-// Return the base64-urlencoded sha256 hash for the PKCE challenge
+
+/**
+ * Return the base64-urlencoded sha256 hash for the PKCE challenge
+ *
+ * @param {String} v - The randomly generated string
+ * @returns {String}
+ */
+
const pkceChallengeFromVerifier = async v => {
const hashed = await sha256(v);
return base64urlencode(hashed);