Since we're base64-encoding, `=` can only happen at the end, so no need to traverse the whole payload.
@@ -42,7 +42,7 @@ class WebAuthnHandler {
return btoa(String.fromCharCode.apply(null, new Uint8Array(value)))
.replace(/\+/g, "-")
.replace(/\//g, "_")
- .replace(/=/g, "");
+ .replace(/=+$/g, "");
}
async post(urlKey, username, data) {