Skip to content

Verifying attestation with a public key using OKP make the server package to crash #700

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Julien-Pires opened this issue May 22, 2025 · 1 comment

Comments

@Julien-Pires
Copy link

Describe the issue

When trying to verify an attestation, with the server library, using a credential having a public key using OKP, verifyOKP function crash with following error:

TypeError: Cannot read properties of undefined (reading 'fromBuffer')
    at verifyOKP (file:///home/node/app/node_modules/.pnpm/@simplewebauthn+server@13.1.1/node_modules/@simplewebauthn/server/esm/helpers/iso/isoCrypto/verifyOKP.js:36:25)

When reviewing the file verifyOKP.js, the error come from this line x: isoBase64URL.fromBuffer(x).

The issue is that the import path is not correct and is going one folder up too far.

Current import: import { isoBase64URL } from '../../index.js';
Correct import: import { isoBase64URL } from '../index.js';.

Reproduction Steps

  1. Create a credential with a public key using OKP
  2. Start an authentication workflow with the same credential
  3. Verify the attestation with simplewebauthn/server

Expected behavior

Attestation verification succeed

SimpleWebAuthn Libraries

@simplewebauthn/[email protected]

@Julien-Pires Julien-Pires changed the title Verifying a public key using OKP make the server package to crash Verifying attestation with a public key using OKP make the server package to crash May 22, 2025
@MasterKale
Copy link
Owner

Hello @Julien-Pires can you please provide a registration response that causes the problem? Ideally as a sample of how you're calling the registration verification method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants