#453 adapted encoding to new library requirements

This commit is contained in:
Roland Gruber 2025-08-26 20:02:32 +02:00
parent cbcb35aba4
commit 1bf03b53e0

View file

@ -2072,7 +2072,10 @@ window.lam.webauthn.authenticate = function(publicKey) {
* @returns base64 string * @returns base64 string
*/ */
window.lam.webauthn.arrayToBase64String = function(input) { window.lam.webauthn.arrayToBase64String = function(input) {
return btoa(String.fromCharCode.apply(null, input)).replaceAll("=", ""); return btoa(String.fromCharCode(...input))
.replaceAll("=", "")
.replaceAll("+", "-")
.replaceAll("/", "_");
} }
/** /**