Comments (2)
A poll on Mastodon didn't help me choose between "change only a couple of files by keeping getWebCrypto()
asynchronous" and "change a bunch of files by making getWebCrypto()
synchronous because it doesn't need async anymore":
So I prepard two PRs:
- #533 makes
getWebCrypto()
synchronous because it no longer needs toawait import('node:crypto')
. This spiders out into the codebase because a lot of async methods that calledawait getWebCrypto()
no longer need to be async, and refactoring all of these pleasesdeno lint
. This includes makinggenerateRegistrationOptions()
andgenerateAuthenticationOptions()
synchronous, which technically makes this a breaking change (though there's no repercussion forawait
ing a synchronousfunction
in JavaScript so it's not as breaking a change as going from synchronous to asynchronous.) - #535 keeps
getWebCrypto()
asynchronous despite not needing toawait
anything. The scope of work is limited to getWebCrypto.ts and its corresponding getWebCrypt.test.ts.
Honestly I'm leaning towards #535 for what feels like an odd justification: not making generateRegistrationOptions()
and generateAuthenticationOptions()
synchronous means all four of the "core library API" methods (those two along with verifyRegistrationResponse()
and verifyAuthenticationResponse()
) remain asynchronous. Put another way, keeping getWebCrypto()
asynchronous means there's no need to remember which core library methods need to be awaited or not because they all need to be await
'd!
I'm gonna sleep on this for a few days and see what I settle on.
from simplewebauthn.
This change is now available in the recently-published @simplewebauthn/[email protected] ✌️
from simplewebauthn.
Related Issues (20)
- cross-platform authenticator usage on android 14 HOT 1
- Default `userDisplayName` to empty string when not specified HOT 1
- Handle undefined `PublicKeyCredential` in `browserSupportsWebAuthnAutofill` helper HOT 1
- Discrepancy between example code and docs HOT 4
- get public key as string
- Make rpID required when generating authentication options HOT 1
- Clean up some docstrings in @simplewebauthn/server
- Rename `AuthenticatorDevice` type and usage
- Parsing the attestation data explicitly HOT 3
- Changed userHandle behavior v10 breaks definitely with existing registrations HOT 2
- RequireUserVerification Is Not Documented HOT 2
- Investigate impact of Deno moving its std library to JSR HOT 2
- Sign-in button capabilities like in Googles Demo HOT 1
- Upgraded to 10 from 9 and iphone no longer to connect with chrome HOT 10
- StartAutentication throwing 'Cannot read properties of undefined (reading 'replace') at base64URLStringToBuffer' HOT 2
- Error: No data when runnning verifyAuthenticationResponse HOT 3
- Add support for WebAuthn's conditional create HOT 1
- Wrong authenticatorAttachment after browser->startRegistration() with YubiKey HOT 1
- Error: No date at Object.decodePartialCBOR (C:\Users\siste\Desktop\web-authentication-main\node_modules\@levischuck\tiny-cbor\script\cbor\cbor.js:355:15) HOT 3
- Registering Passkey on MacOS - ICloud results in two passkeys being created HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simplewebauthn.