Merge branch 'wt3': WebAuthn enhancements and virtual authenticator

- Enhanced createRegistrationOptions to look up existing users
- Added virtual-authenticator testing package
- Added WebAuthn e2e and unit tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
RevIQ
2026-01-09 16:55:14 +08:00
19 changed files with 2684 additions and 11 deletions

View File

@@ -40,7 +40,7 @@ export interface ParsedPasskey {
* Raw passkey row from database
*/
export interface PasskeyRow {
id: number;
id: string | number; // Int8 from DB comes as string
user_id: number;
credential_id: Uint8Array;
public_key: Uint8Array;
@@ -64,7 +64,7 @@ export const parsePasskeyRow = (row: PasskeyRow): ParsedPasskey => {
const publicKeyBytes = new Uint8Array(row.public_key);
return {
id: row.id,
id: Number(row.id), // Convert Int8 (string) to number
credentialId: uint8ArrayToBase64url(row.credential_id),
publicKey: publicKeyBytes,
counter: Number(row.counter),