Passkeys’s properties rawId and id aren’t consistent.
Passkeys have a id
property equal to their rawId
value (an ArrayBuffer
) encoded in base64
. However, the id
property will remove the padding of the value (i.e. the =
character), making it sometimes a different length than if you were to encode the rawId
in bas64
yourself. Both values are valid base64
encoded strings (i.e., decoders will understand them) but ideally default to using id
to avoid these length discrepancies.