passwordless-id / webauthn

Webauthn / passkeys helper library to make your life easier. Client side, server side and demo included.
https://webauthn.passwordless.id
MIT License
436 stars 51 forks source link

Error registering key using 1Password #50

Closed Carlgo11 closed 4 months ago

Carlgo11 commented 4 months ago

Hello, There seems to be something odd happening when trying to register using 1Password Passkeys. I see that a similar issue was reported in #37, but according to 1Password support, getPublicKey has been implemented since the 1Password browser extension version 2.16.1-2 stable. The error message in #37 also differs from mine:

Error: Permission denied to access object
    E utils.ts:15
    o utils.ts:24
    v client.ts:119
    register playground.js:50
    VueJS 4
        click
        dn
        r
        _wrapper
playground.js:66:25

I have tested on both my page using @passwordless-id/webauthn and on the playground demo.

Any idea on what could be wrong and if the bug is with 1Password or this project?

dagnelies commented 4 months ago

Well, since it works on all major browsers and not with 1Password, I guess the issue on their side. I guess the issue is with the getPublicKey() function not being properly implemented on their side. If you enable the debug flag, the raw original webauthn object should be printed in the browser console. image Then try invoking temp1.response.getPublicKey() to see if you get something meaningful.

Carlgo11 commented 4 months ago
temp0.response.getPublicKey()
Restricted {  }
temp0.response.getPublicKeyAlgorithm()
-7 

Looking at the the code doesn't give me any clues as to why it would output this, but I guess I'll reach out to 1Password Support about my issue.

dagnelies commented 4 months ago

You're welcome to reopen this if there is something new since apparently the issue is with 1Password and its incomplete protocol implementation.