index.js
// JWT Validation Middleware. We expect to get config details via the env
JWT Validation Middleware. We expect to get config details via the env
JWT Validation Middleware . We expect to get config details via the env
function protectWithJwt() {
  return jwt({
    secret: process.env.SECRET,
    audience: process.env.JWT_AUDIENCE,
    issuer: process.env.JWT_ISSUER,
    algorithms: ["HS256"],
  });
}
function protectWithJwt ( ) { return jwt ( { secret : process . env . SECRET , audience : process . env . JWT_AUDIENCE , issuer : process . env . JWT_ISSUER , algorithms : [ "HS256" ] , } ) ; }
JWT Validation Middleware.
JWT Validation Middleware .
// TODO: proper public/private key token signing