Skip to content
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

fix/better-get-web-crypto #468

Merged
merged 5 commits into from
Oct 27, 2023
Merged

fix/better-get-web-crypto #468

merged 5 commits into from
Oct 27, 2023

Conversation

MasterKale
Copy link
Owner

This PR refines the logic inside server's getWebCrypto() to support more runtime environments. In particular it should now support CloudFlare Workers with Node polyfills enabled but still missing import('node:crypto').webcrypto (this is similar to Node v14 environments, but the CF docs don't explicitly state a target Node version and say they do support webcrypto in https://developers.cloudflare.com/workers/runtime-apis/nodejs/crypto/#webcrypto 🤷‍♂️)

Supercedes #457 (this PR also adds test coverage over this trickier method to write tests for.)

@MasterKale MasterKale added the package:server @simplewebauthn/server label Oct 27, 2023
@MasterKale MasterKale added this to the v8.3.4 milestone Oct 27, 2023
@MasterKale MasterKale merged commit 6ef44cc into master Oct 27, 2023
2 checks passed
@MasterKale MasterKale deleted the fix/better-get-web-crypto branch October 27, 2023 20:20
@MasterKale
Copy link
Owner Author

@sergiocarneiro This improved logic in getWebCrypto() is now available in @simplewebauthn/server@8.3.4. Give it a try and let me know if it solves the issue ✌️

@MasterKale
Copy link
Owner Author

cc @CameronWhiteside

@sergiocarneiro
Copy link

@MasterKale It's working ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:server @simplewebauthn/server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants