datacite / akita

DataCite Commons
https://commons.datacite.org
MIT License
6 stars 3 forks source link

Replace jsonwebtoken dependency #269

Open jrhoads opened 1 year ago

jrhoads commented 1 year ago

As stated in https://github.com/auth0/node-jsonwebtoken/issues/863,

jsonwebtoken is a Node.js module, its use in a browser was never intended. Versions before 9.0.0 could use webpack's polyfill of the Node.js built-in modules. ....It is better to rely on JWT modules made to be consumed in browser environments. You can discover such modules on jwt.io under "JavaScript" libraries.

There are now issues with versions < 9.x

A potential replacement is something like jose

jrhoads commented 1 year ago

It is currently use here https://github.com/datacite/akita/blob/1150d52d6eab321988ed02a7aef95e07851e9267/src/utils/session.ts#L2