Issue with jose dist's browser/node version understanding #658
-
I am using jose with electron react vite. While using jose.generateKeyPair('ES512'), I am observing that should return type of PublicKeyType and PrivateKeyType but it is returning CryptoKey. Why is that so? I also see that after building the project, in the main js file jose uses the dist/browser folder to generate rather than node folder. I had made a separate small project with only node where it is working perfectly. Can someone help if electron-vite with react needs some extra configs to be changed for this to work? This is my code that works in a file index.js:
same doesn't work as expected in my main.ts with error: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If you get the WebCryptoAPI based build in electron's main process then the issue lies with whatever you use to bundle your application. If it's in the renderer process than that's intended. |
Beta Was this translation helpful? Give feedback.
If you get the WebCryptoAPI based build in electron's main process then the issue lies with whatever you use to bundle your application.
If it's in the renderer process than that's intended.