DEV Community

Chan Aethiopicus
Chan Aethiopicus

Posted on

passkey-go: WebAuthn/passkey assertion verification in pure Go

Hey all πŸ‘‹

I've released passkey-go, a Go library for handling server-side passkey (WebAuthn) assertion verification.

It provides both low-level building blocks (CBOR, COSE, authData parsing) and a high-level VerifyAssertion() function compatible with the output of navigator.credentials.get().

πŸ” Key Features

  • βœ… Pure Go – No CGO or OpenSSL dependency
  • πŸ”’ End-to-end passkey (FIDO2/WebAuthn) support
  • πŸ”§ High-level API: VerifyAssertion(...) to validate client responses
  • 🧱 Low-level parsing: AttestationObject, AuthenticatorData, COSE key β†’ ECDSA
  • πŸ§ͺ Strong error types for HTTP mapping PasskeyError
  • πŸ“Ž Base64URL-compatible and ES256-only (per WebAuthn spec)
  • πŸ—‚ Example code included for both registration and login

πŸ’‘ Why?

Most WebAuthn libraries in Go are tightly coupled to frontend flows or rely on external dependencies.

passkey-go aims to be:

  • πŸ”Ή Lightweight
  • πŸ”Ή Backend-only
  • πŸ”Ή Easy to integrate into your own auth logic

You can issue challenges, parse assertions, and verify signaturesβ€”all within your own backend service.

πŸ“¦ Repo:

https://github.com/aethiopicuschan/passkey-go

I'd love any feedback, bug reports, or feature suggestions (e.g., support for EdDSA, Android quirks, etc). Contributions welcome!

Thanks πŸ™Œ

Top comments (0)