Set of utils for parsing WebAuthn data.
import { parseClient } from "webauthn-parser";
// clientDataJSON comes from credential.response.clientDataJSON
const collectedClientData = parseClient(clientDataJSON);
console.log(collectedClientData);import { parseClient } from "webauthn-parser";
// authenticatorData comes from credential.response.getAuthenticatorData()
const authenticatorDataResult = parseAuthenticatorData(authenticatorData);
console.log(authenticatorDataResult);To install dependencies:
bun installTo test:
bun run testTo build:
bun run build