Next.js
useAddSecurityKey()
Use the hook useAddSecurityKey
to add a WebAuthn security key.
const { add, isLoading, isSuccess, isError, error } = useAddSecurityKey()
const handleFormSubmit = async (e) => {
e.preventDefault()
await add('key nickname')
}