-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[App Check] Reset App Attest key state if attestKey
fails
#11986
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Should the block attempt to retry the query after a reset instead of continuing with the error? |
@jostster My understanding is that the error is the Promises mechanic to trigger a reset. |
@paulb777 Gotcha, so clients would still need to look for the specific error and display something to the user to try the action again? Or would there be a way in the sdk to have it auto retry the previous action when this trigger is hit and the key is reset? |
This is accurate. The firebase-ios-sdk/FirebaseAppCheck/Sources/AppAttestProvider/FIRAppAttestProvider.m Lines 245 to 255 in 6673e7c
The Promises documentation on @jostster There shouldn't be any need to trigger a reset yourself (handled by the SDK). |
Thanks so much, we will undo our temp fix and implement this update. While it will be hard to replicate as we have already reset our key we will keep an eye on it for our end users and file a ticket should there be an edge case to this resolution. Thanks for the quick fix. |
Resets the stored key ID if
attestKey:clientDataHash:completionHandler:
fails due toDCErrorInvalidKey
. This should resolve App Check / App Attest failures after app reinstallation, device migration, or restoration of a device from a backup (see docs).