From f0a198edf4111fc3398d992b8acd9392f9658df3 Mon Sep 17 00:00:00 2001 From: Rob Ferguson Date: Mon, 9 Dec 2024 16:09:30 -0600 Subject: [PATCH] fix: passkey support (#277) * fix: import for passkey ftl * minor css fix * enable passkey * add newline --------- Co-authored-by: Chance <139784371+UnicornChance@users.noreply.github.com> --- src/realm.json | 20 +++++++++++++++++++- src/test/cypress/realm.json | 20 +++++++++++++++++++- src/theme/login/resources/css/new-ui.css | 10 +++++++++- src/theme/login/template.ftl | 7 +++++++ 4 files changed, 54 insertions(+), 3 deletions(-) diff --git a/src/realm.json b/src/realm.json index b642da5..91cb830 100644 --- a/src/realm.json +++ b/src/realm.json @@ -2968,7 +2968,25 @@ "defaultAction": false, "priority": 1001, "config": {} - } + }, + { + "alias": "webauthn-register-passwordless", + "name": "Webauthn Register Passwordless", + "providerId": "webauthn-register-passwordless", + "enabled": true, + "defaultAction": false, + "priority": 1002, + "config": {} + }, + { + "alias": "webauthn-register", + "name": "Webauthn Register", + "providerId": "webauthn-register", + "enabled": true, + "defaultAction": false, + "priority": 1003, + "config": {} + } ], "browserFlow": "UDS Authentication", "registrationFlow": "UDS Registration", diff --git a/src/test/cypress/realm.json b/src/test/cypress/realm.json index a586d60..8f74623 100644 --- a/src/test/cypress/realm.json +++ b/src/test/cypress/realm.json @@ -2741,7 +2741,25 @@ "defaultAction": false, "priority": 1001, "config": {} - } + }, + { + "alias": "webauthn-register-passwordless", + "name": "Webauthn Register Passwordless", + "providerId": "webauthn-register-passwordless", + "enabled": true, + "defaultAction": false, + "priority": 1002, + "config": {} + }, + { + "alias": "webauthn-register", + "name": "Webauthn Register", + "providerId": "webauthn-register", + "enabled": true, + "defaultAction": false, + "priority": 1003, + "config": {} + } ], "browserFlow": "UDS Authentication", "registrationFlow": "UDS Registration", diff --git a/src/theme/login/resources/css/new-ui.css b/src/theme/login/resources/css/new-ui.css index fbffcee..5e13fb3 100644 --- a/src/theme/login/resources/css/new-ui.css +++ b/src/theme/login/resources/css/new-ui.css @@ -374,4 +374,12 @@ body.password .subtitle { .kc-social-section hr{ margin-bottom: 16px; margin-top: 16px; -} \ No newline at end of file +} + +#authenticateWebAuthnButton { + display: block; +} + +#registerWebAuthn { + display: block; +} diff --git a/src/theme/login/template.ftl b/src/theme/login/template.ftl index 6927dd3..f129a9a 100644 --- a/src/theme/login/template.ftl +++ b/src/theme/login/template.ftl @@ -25,6 +25,13 @@ ${msg("loginTitle",(realm.displayName!''))} + <#if scripts??> <#list scripts as script>