New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
My signup form only takes a password, and I want to let new users set up a passkey too without tearing the form apart.
What you'll have at the end
A signup form that always saves a password for the new account, and saves a passkey alongside it too whenever the visitor finishes the browser's prompt, without a cancelled prompt ever blocking the account itself.
You need
A signup form that already posts an email and password to your own server and creates the account from it, with room in that server code to add more logic to the same request.
Not covered
Deciding whether the passkey checkbox should even appear on an unsupported browser or device, and turning a failed WebAuthn call into a message specific to its cause.
Gate a passkey button behind a real support check
go there first if the checkbox itself needs to disappear on a browser or device that cannot complete a passkey at all.
A WebAuthn error that reaches the user as something went wrong
go there for a specific message per failure cause, instead of the one generic skip this recipe falls back to.
Rehearse a passkey flow in Chrome's DevTools
go there to trigger and watch both the success and the cancel path without a real phone or key.
Checked 22 Aug 2026
Part of the Web Authentication and Passkeys cookbook