mirror of
https://github.com/zitadel/zitadel.git
synced 2025-04-27 16:10:50 +00:00

* url safe encoding base64 * js rm export * fix: publish docker image * rm releaserc --------- Co-authored-by: Elio Bischof <eliobischof@gmail.com> Co-authored-by: Silvan <silvan.reusser@gmail.com>
29 lines
804 B
JavaScript
29 lines
804 B
JavaScript
function checkWebauthnSupported(button, func) {
|
|
let support = document.getElementsByClassName("wa-support");
|
|
let noSupport = document.getElementsByClassName("wa-no-support");
|
|
if (!window.PublicKeyCredential) {
|
|
for (let item of noSupport) {
|
|
item.classList.remove("hidden");
|
|
}
|
|
for (let item of support) {
|
|
item.classList.add("hidden");
|
|
}
|
|
return;
|
|
}
|
|
document.getElementById(button).addEventListener("click", func);
|
|
}
|
|
|
|
function webauthnError(error) {
|
|
let err = document.getElementById("wa-error");
|
|
err.getElementsByClassName("cause")[0].innerText = error.message;
|
|
err.classList.remove("hidden");
|
|
}
|
|
|
|
function bufferDecode(value, name) {
|
|
return coerceToArrayBuffer(value, name);
|
|
}
|
|
|
|
function bufferEncode(value, name) {
|
|
return coerceToBase64Url(value, name);
|
|
}
|