Closed gtgalone closed 2 years ago
Same issue with node v16.13.0 and jwks-rsa v2.0.5.
@gtgalone @amrityam - this works for me on v16.13.2 https://replit.com/@AdamMcGrath/NervousMistyEquation
There's no reason why Node 16.13 shouldn't have crypto.getCurves
Can you provide an example replit.com
that demonstrates the issue?
Closing - feel free to provide a reproducible case if you want me to reopen
Hi, I am facing the same issue when trying to use jwks-rsa
to verify JWT in Next.js middleware. There's some problem with the older version of jose
package when try to import the built-in node module idk why, kindly check this issue. I think bump jose
to v3 above will solve this problem.
Hi, can you reopen this issue and fix this problem? @adamjmcgrath
@adamjmcgrath @retr00exe I was facing the same problem using jwks-rsa
in next.js. The function using jwks-rsa
was being exported from the main entry point of one of my monorepo packages and that package was being imported client side.
So in order to solve the issue, I removed the export of that function from the main entry point and exported from another entry point that I only use server-side and now everything is cool.
error - node_modules/jwks-rsa/node_modules/jose/lib/registry/ec_curves.js (5:0) @
TypeError: getCurves is not a function
node v16.13.1 jwks-rsa v2.0.5