Currently, WebAuthn/Passkeys are only designed for signing; you could re-use a challenge to be signed, but then the signature is as secure as a password (i.e., your Passkey would produce the same signature every time.)
WebAuthn also only works in secure contexts (HTTPS)—you couldn't make it work in a plain .html file.
WebAuthn also only works in secure contexts (HTTPS)—you couldn't make it work in a plain .html file.