aws-samples / amazon-cognito-passwordless-auth

Passwordless authentication with Amazon Cognito: FIDO2 (WebAuthn, support for Passkeys), Magic Link, SMS OTP Step Up
Apache License 2.0
382 stars 70 forks source link

Unable to use 1password for passkey #147

Open jplock opened 9 months ago

jplock commented 9 months ago

Whenever I try to register a passkey saved in 1Password, this error message is shown in the UI:

Failed to activate face or touch unlock: credential.response is not an instance of AuthenticatorAttestationResponse

1Password is successfully saving the passkey though.

ottokruse commented 9 months ago

Mmm not the first time we see 1password being idiosyncratic: https://github.com/aws-samples/amazon-cognito-passwordless-auth/issues/94

They inject themselves into the browser, but don't do so fully transparently. You should file an issue with them as well

jplock commented 9 months ago

Strange, it works fine with Safari and 1Password, but not Firefox and 1Password

ottokruse commented 9 months ago

Instead of doing the instanceof checks we could check the interface (duck typing):

https://github.com/aws-samples/amazon-cognito-passwordless-auth/blob/d7dda2898e5bfe227a4c5e5c4a46b1a07a4d83aa/client/fido2.ts#L87-L94

https://github.com/aws-samples/amazon-cognito-passwordless-auth/blob/d7dda2898e5bfe227a4c5e5c4a46b1a07a4d83aa/client/fido2.ts#L381-L388

ottokruse commented 9 months ago

But as said, you should file this with 1Password as well

myevit commented 8 months ago

I have no issues using 1Password for passkeys. Looks like localized issue. 1Password browser extension issues?

ottokruse commented 8 months ago

You use Firefox too @myevit ?

myevit commented 8 months ago

I use 3: Edge, Crome and Firefox. No issues with all of them with 1Password. there were some behaviour that browser bypassing 1Password passkey hook and go straight to system passkey UI, but so far I can tell, it is not an issue of your app.

myevit commented 8 months ago

Update: Firefox start to give me credential.response is not an instance of AuthenticatorAssertionResponse error on filling out 1Password passkey. It might be happening long time ago, I do use Firefox only for developing. What's weird is that it's working on as dev on http://localhost:5173 but deployed to cloud. Edge has no issues. Windows Hello seems have no issues... Probably some 1Password extension bug.