debug: store credentialId in sessionStorage during credential creation

This commit is contained in:
NicolasCantu 2025-10-26 02:38:58 +01:00
parent 64f4d217d6
commit c858a75a9c

View File

@ -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) {