From c858a75a9cc4b5e347c5fb79363b2db97ef49e87 Mon Sep 17 00:00:00 2001 From: NicolasCantu Date: Sun, 26 Oct 2025 02:38:58 +0100 Subject: [PATCH] debug: store credentialId in sessionStorage during credential creation --- src/services/credentials/webauthn.service.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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) {