implement missing authenticator selector

This commit is contained in:
Constantin Wildförster 2022-11-08 15:18:14 +01:00
parent 0b1682031c
commit 8ce6c30fde
No known key found for this signature in database
GPG key ID: 5DDDBFF28CC85AFB
2 changed files with 29 additions and 1 deletions

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,28 @@
<#import "template.ftl" as layout>
<@layout.registrationLayout displayInfo=false; section>
<#if section = "header">
${kcSanitize(msg("loginChooseAuthenticator-registration-title"))}
<#elseif section = "form">
<script type="text/javascript">
function fillAndSubmit(authExecId) {
document.getElementById('authexec-hidden-input').value = authExecId;
document.getElementById('kc-select-credential-form').submit();
}
</script>
<form id="kc-select-credential-form" action="${url.loginAction}" class="m-0 space-y-4" method="post">
<div class="flex flex-col space-y-4">
<#list auth.authenticationSelections as authenticationSelection>
<div class="px-4 py-2 relative rounded-lg cursor-pointer hover:bg-primary-50" onclick="fillAndSubmit('${authenticationSelection.authExecId}')">
<p class="font-bold text-lg">${msg('${authenticationSelection.displayName}')}</p>
<p>${msg('${authenticationSelection.helpText}')}</p>
</div>
</#list>
</div>
<input type="hidden" id="authexec-hidden-input" name="authenticationExecution" />
</form>
</#if>
</@layout.registrationLayout>