Dear Experts,
I have App Attest deployed in an app that is currently in TestFlight. Its works OK most of the time.
For one particular user, however, attestKey
fails with DCErrorInvalidKey
for a new key that it has just created.
I have some insight into what the app is doing because I send diagnostics to the server. It seems that for this user, the sequence of events is:
- Initially the app has no key ID saved.
- The user initiates an action that requires App Attest-signed communication with my server.
- The app calls
generateKey
which seems to succeed. - The app fetches a challenge from the server.
- The app calls
attestKey.
attestKey
returnsDCErrorInvalidKey.
- The app doesn't save the key ID persistently, so next time the same thing happens.
attestKey
really shouldn't fail with the invalid key error for a key that it has just created, should it?
What could be going on here?