I'm currently able to create publicKeyCredentials using:
navigator.credentials.create({
challenge: Uint8Array.from('CCCCCCCCCCCCCCCCCCCCCC', c => c.charCodeAt(0)),
rp: {
id,
name: 'rpName'
},
user: {
id: Uint8Array.from('userHandleId', c => c.charCodeAt(0)),
name: 'userName',
displayName: 'DisplayName'
},
pubKeyCredParams: [{alg: -7, type: 'public-key'}],
authenticatorSelection: {
userVerification: 'discouraged',
authenticatorAttachment: 'platform',
requireResidentKey: true, // don't seem to do anything with android-saftynet
residentKey: 'required' // don't seem to do anything with android-saftynet
},
timeout: 60000,
attestation: 'direct'
})
Then retrieve the credential using:
navigator.credentials.get({
publicKey: {
challenge: generateChallenge(),
allowCredentials: [{
id: decodeArray(id),
type: 'public-key'
}],
timeout: 60000,
transport: ['internal'],
userVerification: 'discouraged'
},
})
This flow works on all of my apple devices, however, on Android the 'fmt' of the credentials is 'android-saftynet' which doesn't seem to support userHandles.
Are there any formats I can force on Android that I can save userHandles with? Or another way to store information with the publicKeyCredential to allow me to support the usernameless webauthn flow?
EDIT: Looks like android-saftynet doesn't support userHandle. Does anyone know if there is an Android authenticator flow that supports userHandle? (aside from the USB auth flow)