Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

credentials.response.getPublicKey() inconsistent behaviour across different platforms #30

@dushebaa

Description

@dushebaa

When creating a new credential, parseCredentialPublicKey is called with a Uint8Array value of credential.response.getPublicKey(). On iOS and macOS systems (idk about linux), the byte length returned by getPublicKey() is 91 bytes. Your tests also make use of a 91-byte public key (credential.test.ts:14).

The problem is, on windows systems, byte array that is returned by credential.response.getPublicKey() is 294 bytes long (tested on Windows 10 22H2 19045.4529, edge, firefox and brave, all have the same issue). It leads to crypto failing to import key in bytesToCryptoKey function, throwing DataError, which leads to createCredential function failing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions