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

Is possible to detect Cloudflare workers or add browser target? #77

Closed
aazf opened this issue Oct 31, 2022 · 2 comments
Closed

Is possible to detect Cloudflare workers or add browser target? #77

aazf opened this issue Oct 31, 2022 · 2 comments

Comments

@aazf
Copy link

aazf commented Oct 31, 2022

In Cloudflare Workers or some cloud functions them use WebCrypto instead crypto.
But when use npm install @noble/secp256k1, the default is use crypto not WebCrypto.

So is possible to detect the runtime or add browser module compile?

https://github.com/panva/jose/blob/main/package.json#L95
https://github.com/panva/jose/blob/main/package.json#L120

Thanks

@paulmillr
Copy link
Owner

Of course. You can write a code that detects it and submit a pull request with tests.

@aazf
Copy link
Author

aazf commented Oct 31, 2022

Of course. You can write a code that detects it and submit a pull request with tests.

Done.

@aazf aazf closed this as completed Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants