You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experimenting and constructAttestationObject() fails on the assertion because authenticatorData is 164 bytes long instead of 141 and seemingly it's because the encodedPublicKey in constructAttestedCredentialData() is longer than expected. I'm using a Pixel 3 with Android 12 and here is the code snippet I'm useing to call your library:
fun register() {
val authenticator = Authenticator(context, false, false)
val options = AuthenticatorMakeCredentialOptions().apply {
clientDataHash = generateId(32)
credTypesAndPubKeyAlgs = listOf(Pair("public-key", -7))
requireUserPresence = true
rpEntity = RpEntity().apply { name = "Test.Company"; id = "testCompany" }
userEntity = UserEntity().apply { name = "testUser"; displayName = "Test User"; id = generateId(32) }
}
val attestationObject = authenticator.makeCredential(options)
Log.d(TAG, "attestation object id: ${attestationObject.credentialIdBase64}")
}
private fun generateId(length: Int): ByteArray {
val random = SecureRandom()
val bytes = ByteArray(length)
random.nextBytes(bytes)
return bytes
}
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Hi,
I'm experimenting and constructAttestationObject() fails on the assertion because authenticatorData is 164 bytes long instead of 141 and seemingly it's because the encodedPublicKey in constructAttestedCredentialData() is longer than expected. I'm using a Pixel 3 with Android 12 and here is the code snippet I'm useing to call your library:
Thanks in advance!
The text was updated successfully, but these errors were encountered: