The authenticate() function in the client library assumes that the allowCredentials array contains objects with an id property. However, when passing an array of credential ID strings directly, the function throws a TypeError.
import { client } from '@passwordless-id/webauthn'
// Call the `authenticate()` function with an array of credential ID strings:
const authentication = await client.authenticate({
challenge: "server-generated-challenge",
allowCredentials: ["credentialId1", "credentialId2"],
timeout: 60000
})
Results in TypeError: "Cannot read properties of undefined (reading 'replaceAll')"
The
authenticate()
function in the client library assumes that theallowCredentials
array contains objects with anid
property. However, when passing an array of credential ID strings directly, the function throws a TypeError.Results in
TypeError: "Cannot read properties of undefined (reading 'replaceAll')"
src/client.ts
authenticate()
diff