diff --git a/src/services/credentials/webauthn.service.ts b/src/services/credentials/webauthn.service.ts index e6a3de0..6899f86 100644 --- a/src/services/credentials/webauthn.service.ts +++ b/src/services/credentials/webauthn.service.ts @@ -200,8 +200,14 @@ export class WebAuthnService { console.log('🔐 WebAuthn credential created successfully:', credential); const response = credential.response as AuthenticatorAttestationResponse; + const credentialId = Array.from(new Uint8Array(credential.rawId)).map(b => b.toString(16).padStart(2, '0')).join(''); + + // TEST: Store credentialId in sessionStorage for testing + console.log('🔐 TEST: Storing credentialId in sessionStorage:', credentialId); + sessionStorage.setItem('webauthn_credential_id', credentialId); + return { - id: Array.from(new Uint8Array(credential.rawId)).map(b => b.toString(16).padStart(2, '0')).join(''), + id: credentialId, publicKey: Array.from(new Uint8Array(response.getPublicKey()!)) }; } catch (error) {