I suspect this is an issue with Google’s passkey implementation, but it might not be, and if there is a solution I suspect this post will be useful for all other third-party passkey providers encountering the same issue.
I have implemented Passkeys in our password manger using the new APIs introduced in iOS17. Passkey attestation and assertion works as expected with every service we’ve tested that supports Passkeys (I.e Webauthn.io, GitHub, etc). However the only service that doesn‘t work is Google.
I can create a passkey for Google using iCloud Keychain just fine, but for some reason, although my app successfully creates the passkey, Google is rejecting it.
I suspect this is a security measure on Google’s side, but it will be a UX nightmare for users of third-party passkey managers on iOS 17, as they won’t be able to create or sign in with a passkey for Google (which will probably be the number 1 use-case for using passkeys).
When using iCloud Keychain to create a passkey, unlike other services, I noticed that Google actually recognises that I’ve used iCloud Keychain to create the Passkey, and labels the Passkey with “iCloud Keychain”.
-
Is Apple sending some additional identifying info in their attestation statement that I’m not sending?
-
If not, how is Google able to identify the passkey provider (in this case “iCloud Keychain”) by name?
-
Could it be that Google has somehow whitelisted iCloud Keychain for Passkey creation, while disallowing third-party providers?
Assuming it is the latter, unfortunately there is no way to reach out to Google about this. I suspect Apple would need to advocate on the behalf of third-party providers running on apple platforms, that they be allowed to provide passkeys for Google sign in.
Its a shame to hit this type of road block so close to the iOS 17 release candidate.
For posterity, @Incogn1to had already run into this issue and rightly pointed out here that the WebAuthn spec requires that the attestationObject
‘s dictionary keys be sorted in a specific order. It turns out that Google seem to be the only RP that’s validating this.
I missed that requirement, but I can confirm that using an ordered dictionary has resolved the issue.
Thanks again @Incogn1to and @garrett-davidson!