User WebAuthPassworldless registration

Hi, I’d like to know if it’s possible, when a user registers for the first time on Keycloak, to also register their passkey, as I’m doing in the flow below for the OTP. I’ve searched a lot, and I haven’t found anyone or anything that can give me a concrete answer, I’ve also tried and it always gives me an error.

Regards

There is a way to achieve this.

I assume that you’ve already configured the Webauthn Passwordless settings.

Under AuthenticationRequired actions you can set Webauthn Register Passwordless “Set as default action” to true. This will add Webauthn Register Passwordless to the required actions of newly created users.
In practice, this result in the following flow: You fill out the registration form and submit, check your emails and click on the Email Confirmation Link, which will then show you this page: