-
Notifications
You must be signed in to change notification settings - Fork 18
Add WebAuthn library and SignerWebAuthn #117
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
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Ernesto García <[email protected]>
Co-authored-by: Arr00 <[email protected]>
Co-authored-by: Gonzalo Othacehe <[email protected]> Co-authored-by: Gonzalo Othacehe <[email protected]>
Co-authored-by: Arr00 <[email protected]> Co-authored-by: Gonzalo Othacehe <[email protected]>
Co-authored-by: ernestognw <[email protected]>
Co-authored-by: ernestognw <[email protected]>
function validateBackupEligibilityAndState(bytes1 flags) internal pure returns (bool) { | ||
return (flags & AUTH_DATA_FLAGS_BE) != 0 || (flags & AUTH_DATA_FLAGS_BS) == 0; | ||
} |
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.
Would prefer consistency on how we are checking the value of a bit
flags & AUTH_DATA_FLAGS_BE) != 0
or flags & AUTH_DATA_FLAGS_BE) == AUTH_DATA_FLAGS_BE
Otherwise looks good
test/helpers/signers.js
Outdated
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.
I'm wondering, is there a WebAuthn library/package we would be using ?
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.
Yes, these has been around since forever: https://viem.sh/account-abstraction/accounts/webauthn/createWebAuthnCredential#createwebauthncredential
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.
Goes well with pimlico too:
https://docs.pimlico.io/references/permissionless/how-to/signers/passkey-server#install-the-required-packages
Implements WebAuthn authentication verification for smart contracts using P256 signatures as an alternative to traditional secp256k1 ECDSA. This library enables strong authentication through WebAuthn Level 2 standard compliance.
Includes 3 verification levels:
verifyMinimal
: Essential cryptographic checksverify
: Standard verification with user presenceverifyStrict
: Enhanced security with user verification and backup state checks