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 base64urlencode method

jamesgeorge0073ba279c81b6c
diff --git a/assets/js/oauth.js b/assets/js/oauth.js
index d9cabff26..e2a64fe29 100644
--- a/assets/js/oauth.js
+++ b/assets/js/oauth.js
@@ -96,7 +96,14 @@ const sha256 = plain => {
const data = encoder.encode(plain);
return window.crypto.subtle.digest("SHA-256", data);
};
-// Base64-urlencodes the input string
+
+/**
+ * Base64-urlencodes the input string
+ *
+ * @param {String} str - The string to be converted
+ * @returns {Promise<ArrayBuffer>}
+ */
+
const base64urlencode = (
str // Convert the ArrayBuffer to string using Uint8 array to convert to what btoa accepts.
) =>