I have to interface my express with an API of an external service. Express authenticates with bearer token, and every two hours it has to repeat the login and get a new token.
Is there already a good library that supports this scheme? (It's nothing complicated, I can easily write a sketch solution myself, but if there was something ready and tested I would like to use it)
You can use jsonwebtoken , this is a module that allows you to generate jwt tokens pretty easily but with many available options.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.