-
Notifications
You must be signed in to change notification settings - Fork 91
NPM (nodejs) module not working #5
Comments
Thanks for your feedback. The readme file clearly states: "This library is designed to work in the browser" which is why node.js hasn't been a priority. Adding node.js support might involve writing (or importing) a crypto polyfill (afaik node.js's crypto API is not the same as http://www.w3.org/TR/WebCryptoAPI/). We could also keep the same JoseJWE API but build against Node's crypto API. If you think node.js support will be valuable and you are interested to work on it, I'll be thrilled to help and/or discuss things with you! |
Right now I'm just experimenting, but I wanted to open this issue just so there was a discussion on it. Glad to hear you're open to contributions in this direction. If I do end up going ahead with this I will definitely start submitting some PR's. Sounds like porting tests over will be a first step, at least to see how much is broken with node's crypto API. |
+1. Remove this from npm if you're not going to support node, please. |
If anyone is interested in working on a polyfill for webcrypto that supports just enough to make this work, reach out to me. |
get rid of a console.warn that could mess with karma:with_coverage. Perhaps Travis needs it
This can probably be closed now, we are using this with node-webcrypto-ossl. |
There are a few problems, just want to collect them here:
require('./node_modules/jose-jwe/dist/jose-jwt.js')
btoa()
which doesn't exist in nodeThe text was updated successfully, but these errors were encountered: