1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-26 18:21:01 +00:00

feat(webauthn): show help message regarding username and non-discoverable credentials

The username is required for non-resident keys, but it's not necessary for discoverable credentials like Passkeys.
This commit is contained in:
Frédéric Guillot 2024-10-26 21:16:08 -07:00
parent 2bcc4b8399
commit 51030ef1a8
22 changed files with 52 additions and 8 deletions

View file

@ -24,16 +24,28 @@
</div>
</form>
{{ end }}
{{ if and (not disableLocalAuth) (.webAuthnEnabled) }}
<hr>
{{ end }}
{{ if .webAuthnEnabled }}
<div class="webauthn">
<div role="alert" class="alert alert-error hidden" id="webauthn-error">
{{ t "page.login.webauthn_login.error" }}
</div>
<template id="webauthn-error">
<div role="alert" class="alert alert-error" id="webauthn-error-alert">
<h4>{{ t "page.login.webauthn_login.error" }}</h4>
<p id="webauthn-error-message"></p>
</div>
</template>
<div class="buttons">
<button class="button button-primary" id="webauthn-login" disabled>{{ t "page.login.webauthn_login" }}</button>
</div>
<div class="form-help">
<p>{{ t "page.login.webauthn_login.help" }}</p>
</div>
</div>
{{ end }}
{{ if and (.webAuthnEnabled) (or (hasOAuth2Provider "google") (hasOAuth2Provider "oidc")) }}
<hr>
{{ end }}
{{ if hasOAuth2Provider "google" }}
<div class="oauth2">
<a href="{{ route "oauth2Redirect" "provider" "google" }}">{{ t "page.login.google_signin" }}</a>