bx-passkeys 0.2.0
Released .
- Breaking: with
originsempty, onlyhttps://<rpId>is allowed now, not its subdomains. Set the newallowSubdomains: true(or listorigins) to allow them. - Breaking:
CredentialStore.updateUsage()returns a boolean and must save only while the counter moves forward (or stays 0), in one step. Custom stores need updating. - A cloned key that sent counter 0 got past the clone check and reset the stored counter to 0. Any counter that doesn't move forward is now refused.
- Two sign-ins racing with the same counter can't both succeed:
TableCredentialStoreupdates withsign_count < ?, and the memory store checks under its lock. - Taking a challenge is locked per session, so one assertion can't be used by two parallel requests.
- Registration and sign-in keep separate challenges, so starting a sign-in (in another tab, say) no longer cancels a registration in progress.
- Registration requires the COSE key in
authenticatorData; a browser SPKI key is checked against it rather than trusted on its own. - Credential ids over 1023 bytes are refused, ids are stored in canonical base64url, and transports are capped at 10 distinct entries.
maxPerUseris checked at registration too.- Sign-in refuses passkeys whose algorithm was taken out of
algorithms. - SQL scripts: binary collations on
credential_idanduser_id(MSSQL, MySQL);nameis bound asnvarcharso non-ASCII names survive on MSSQL. MemoryCredentialStorematches user ids exactly and reads under its lock.- Module defaults live only in
RelyingParty; oneSecureRandomand Base64 coder are shared.