From 3ba279c81b6c57578c5cae45296739ffb64a0d84 Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Sat, 11 Jan 2020 13:24:04 +0530 Subject: [PATCH] chore: method signatures for base64urlencode method --- assets/js/oauth.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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} + */ + const base64urlencode = ( str // Convert the ArrayBuffer to string using Uint8 array to convert to what btoa accepts. ) =>