mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
refactor: Update register handler to use protocol.CredentialDescriptor struct
This commit is contained in:
@@ -107,13 +107,9 @@ navigator.credentials
|
||||
.then((newCredentialInfo) => {
|
||||
// Convert credential to base64 string
|
||||
const credentialJSON = JSON.stringify({
|
||||
id: newCredentialInfo.id,
|
||||
rawId: Array.from(new Uint8Array(newCredentialInfo.rawId)),
|
||||
response: {
|
||||
attestationObject: Array.from(new Uint8Array(newCredentialInfo.response.attestationObject)),
|
||||
clientDataJSON: Array.from(new Uint8Array(newCredentialInfo.response.clientDataJSON))
|
||||
},
|
||||
type: newCredentialInfo.type
|
||||
CredentialID: Array.from(new Uint8Array(newCredentialInfo.rawId)),
|
||||
Type: newCredentialInfo.type,
|
||||
Transport: newCredentialInfo.response.getTransports ? newCredentialInfo.response.getTransports() : []
|
||||
});
|
||||
document.getElementById('credential-data').value = btoa(credentialJSON);
|
||||
// Show credential details
|
||||
|
||||
Reference in New Issue
Block a user