safe-global / safe-modules

A collection of modules that can be used with the Safe contract
GNU Lesser General Public License v3.0
151 stars 74 forks source link

Passkey signer error when using Bitwarden extension #500

Closed richardhenry closed 6 days ago

richardhenry commented 1 week ago

Description

One of our users is experiencing issues using the passkey signer with their Safe wallet in my dapp. I think the issue is that they are using the Bitwarden Chrome extension for passkeys/passwords, which doesn't seem to provide passkey data as an ArrayBuffer. This is probably non-standard behavior, but Bitwarden otherwise works fine for general passkey sign-in, so I suspect that maybe the WebAuthn code in the Safe library needs to be more robust.

Here is the error that they were seeing in their browser console:

Screenshot_2024-11-18_at_6 59 35_PM

Environment

Steps to reproduce

  1. Use Google Chrome with the Bitwarden browser extension
  2. Call signSafeOperation with a passkey signer
nlordell commented 6 days ago

Thanks for the detailed issue report.

Any chance you can console.log the data passed into the DataView constructor? According to the WebAuthn standard it should be an ArrayBuffer and would be surprised if it were something else.

Also, this is done over the Safe{SDK} - so the issue should be moved to the appropriate repository https://github.com/safe-global/safe-core-sdk (this one is for the on-chain contracts).

nlordell commented 6 days ago

Moved here: https://github.com/safe-global/safe-core-sdk/issues/1054