When i try to login using WebAuthn on navigator.credentials.get()
.
I need to push some values on property allowCredentials
because Chrome Mobile it does not allow empty allowCredentials
.
The hard part is inside the transports
property, because according to Mozilla documentation, is an array of strings. I have an array of only one string = internal
, because i don't need a usb or enything else.
credencialesPermitidas.push({
id: base64ArrayBuffer.decode(id),
type: "public-key",
transports: ["internal"]
});
navigator.credentials
.get({
publicKey: {
rpId: "localhost",
challenge: base64ArrayBuffer.decode(response.data.result),
userVerification: "discouraged",
allowCredentials: credencialesPermitidas,
timeout: 60000
}
})
With these configuration, everything works, but when the process finishes verifying the identity, the result is an error:
If transports
is empty, the process needs a USB Key... and I do not understand this point.