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
454 stars 53 forks source link

add: support for node v14, v16 #33

Closed Arch0125 closed 1 year ago

dagnelies commented 1 year ago

Hi, I struggled quite a lot to make the same build work for browsers and node and cloudflare workers, etc. I'm also pretty sure changing the --platform=neutral to --platform=node will bust the bundle for several of such platforms. 💣

Moreover, node 14 and 16 are deprecated, they reached end-of-life and don't even receive security fixes anymore. Therefore, I'm gonna ignore them.

Node 18 support would have been nice, but on the other hand, it would imply that all other platforms pull one more dependency (is it even a cross platform dependency working well in browsers, cloudflare workers, deno, etc.?).

Because of these reasons, I'll close the PR. Thanks for the effort though. If you want, I can link your fork in the README for those looking for older Node versions compatibility.

Arch0125 commented 1 year ago

Thanks for going through the PR Yeah definitely changing --platform=neutral to --platform=node might break build for several other platforms as well, however I was just targeting the node platform with this PR.

Regarding support, yeah it does support Node v18 as well, but still as you mentioned it would still require crypto as a outside dependency and as far other platforms go i'm looking into them

It'll be great if you drop the link in the Readme as I've seen many projects still running on Node v16 if not v14

dagnelies commented 1 year ago

Ok, let's do that 👍

dagnelies commented 1 year ago

Added following comment to README:

(*) For older Node versions, take a look at Arch0125's fork. (The reason of the Node 19+ compatibility is basically WebCrypto being globally available, making it possible to use the same build for all targets: browser, node, clouflare workers...)