Slide 49
Slide 49 text
Registrationの実装 (Functions)
const credential: Credential = {
user: uid,
credId: coerceToBase64Url(result.authnrData.get('credId'), 'credId'),
publicKey: result.authnrData.get('credentialPublicKeyPem'),
aaguid: coerceToBase64Url(result.authnrData.get('aaguid'), 'aaguid'),
prevCounter: result.authnrData.get('counter'),
transports,
created: firebase.firestore.FieldValue.serverTimestamp()
}
const credentialRef = db.doc(`/instanceId/${iid.id}/credentials/${credential.credId}`)
await credentialRef.create(credential)