From b01bbfdb5bdc18cbbf532e29de248e77819dbbf9 Mon Sep 17 00:00:00 2001 From: Julien Oculi Date: Wed, 19 Jun 2024 10:34:43 +0200 Subject: [PATCH] feat(ux): :sparkles: allow user to name passkey at register --- islands/PassKeyRegister.tsx | 55 +++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/islands/PassKeyRegister.tsx b/islands/PassKeyRegister.tsx index 621c8a8..d1a1c7a 100644 --- a/islands/PassKeyRegister.tsx +++ b/islands/PassKeyRegister.tsx @@ -1,6 +1,6 @@ import { startRegistration } from '@simplewebauthn/browser' import { PublicKeyCredentialCreationOptionsJSON } from '@simplewebauthn/types' -import { Button } from 'univoq' +import { Button, Input } from 'univoq' import type { WebAuthnRegisterFinishPayload, WebAuthnRegisterStartPayload, @@ -11,40 +11,50 @@ function isWebAuthnSupported(): boolean { return 'credentials' in navigator } -function RegisterButton({ disabled }: { disabled?: boolean }) { +function RegisterForm({ disabled }: { disabled?: boolean }) { return ( - +
+ + +
) } export default function PassKeyRegister() { if (!isWebAuthnSupported()) { return ( -