Implementing JWE encryption for a JWS signed token in Node.JS with Jose 4.11

Advertisements I have difficulty manipulating the Jose Node.JS documentation to chain the creation of a JWS and JWE. I cannot find the proper constructor for encryption. It looks like I can only encrypt a basic payload not a signed JWS. Here is the code sample I try to fix to get something that would look… Read More Implementing JWE encryption for a JWS signed token in Node.JS with Jose 4.11

Is it advisable to use the Express app.use() method call within an async callback?

Advertisements My question begs a recommendation on best practice. I wrote a simple Express server that creates a JWT and sends it to the client whenever it (the client) hits an API route. I have kept the route handler in a separate module and exported it from there because I want to keep the code… Read More Is it advisable to use the Express app.use() method call within an async callback?