Files
zitadel/internal/ui/login/static/templates/passwordless.html
T
Livio AmstutzandGitHub 410a53f15b fix: enable login with password when passwordless set up (#1120)
* fix: enable login with password when passwordless set up

* enable only it allowed
2020-12-18 13:42:21 +01:00

43 lines
1.4 KiB
HTML

{{template "main-top" .}}
<div class="head">
{{ template "user-profile" . }}
<p>{{t "Passwordless.Description"}}</p>
</div>
<form action="{{ passwordLessVerificationUrl }}" method="POST">
{{ .CSRF }}
<input type="hidden" name="authRequestID" value="{{ .AuthReqID }}"/>
<input type="hidden" name="credentialAssertionData" value="{{ .CredentialCreationData }}"/>
<input type="hidden" name="credentialData"/>
<div id="webauthn">
<p class="wa-no-support error hidden">{{t "WebAuthN.NotSupported"}}</p>
<a id="btn-login" class="button primary wa-support">{{t "Actions.ValidateToken"}}</a>
<div id="wa-error" class="error hidden">
<span class="cause"></span>
<span>{{t "WebAuthN.Error.Retry"}}</span>
</div>
</div>
{{ template "error-message" .}}
<div class="actions">
{{if .PasswordLogin}}
<button class="secondary" name="passwordlogin" value="true" type="submit">{{t "Actions.PasswordLogin"}}</button>
{{end}}
<a href="{{ loginNameChangeUrl .AuthReqID }}">
<button class="secondary" type="button">{{t "Actions.Back"}}</button>
</a>
</div>
</form>
<script src="{{ resourceUrl "scripts/base64.js" }}"></script>
<script src="{{ resourceUrl "scripts/webauthn.js" }}"></script>
<script src="{{ resourceUrl "scripts/webauthn_login.js" }}"></script>
{{template "main-bottom" .}}