mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 03:24:26 +00:00
fix: webauthn support check (#2450)
This commit is contained in:
parent
b71413fa6c
commit
415d0c7ab2
@ -1,7 +1,7 @@
|
||||
function checkWebauthnSupported(button, func) {
|
||||
let support = document.getElementsByClassName("wa-support");
|
||||
let noSupport = document.getElementsByClassName("wa-no-support");
|
||||
if (typeof (PublicKeyCredential) === undefined) {
|
||||
if (!window.PublicKeyCredential) {
|
||||
for (let item of noSupport) {
|
||||
item.classList.remove('hidden');
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
<div class="fields">
|
||||
<p class="wa-no-support lgn-error hidden">{{t "InitMFAU2F.NotSupported"}}</p>
|
||||
<div class="field">
|
||||
<div class="field wa-support">
|
||||
<label class="lgn-label" for="name">{{t "InitMFAU2F.TokenNameLabel"}}</label>
|
||||
<input class="lgn-input" type="text" id="name" name="name" autocomplete="off" autofocus>
|
||||
</div>
|
||||
@ -46,4 +46,3 @@
|
||||
<script src="{{ resourceUrl "scripts/webauthn_register.js" }}"></script>
|
||||
|
||||
{{template "main-bottom" .}}
|
||||
|
@ -16,7 +16,7 @@
|
||||
<input type="hidden" name="credentialAssertionData" value="{{ .CredentialCreationData }}"/>
|
||||
<input type="hidden" name="credentialData"/>
|
||||
|
||||
<p class="wa-no-support error hidden">{{t "VerifyMFAU2F.NotSupported"}}</p>
|
||||
<p class="wa-no-support lgn-error hidden">{{t "VerifyMFAU2F.NotSupported"}}</p>
|
||||
|
||||
<div id="wa-error" class="error hidden">
|
||||
<span class="cause"></span>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<input type="hidden" name="credentialAssertionData" value="{{ .CredentialCreationData }}"/>
|
||||
<input type="hidden" name="credentialData"/>
|
||||
|
||||
<p class="wa-no-support error hidden">{{t "Passwordless.NotSupported"}}</p>
|
||||
<p class="wa-no-support lgn-error hidden">{{t "Passwordless.NotSupported"}}</p>
|
||||
<div id="wa-error" class="error hidden">
|
||||
<span class="cause"></span>
|
||||
<span>{{t "Passwordless.ErrorRetry"}}</span>
|
||||
|
@ -23,7 +23,7 @@
|
||||
<div class="fields">
|
||||
<p class="wa-no-support lgn-error hidden">{{t "PasswordlessRegistration.NotSupported"}}</p>
|
||||
{{if not .Disabled}}
|
||||
<div class="field">
|
||||
<div class="field wa-support">
|
||||
<label class="lgn-label" for="name" disabled="false">{{t "PasswordlessRegistration.TokenNameLabel"}}</label>
|
||||
<input class="lgn-input" type="text" id="name" name="name" autocomplete="off" autofocus>
|
||||
</div>
|
||||
@ -49,4 +49,3 @@
|
||||
<script src="{{ resourceUrl "scripts/webauthn_register.js" }}"></script>
|
||||
|
||||
{{template "main-bottom" .}}
|
||||
|
Loading…
Reference in New Issue
Block a user