Hi,
I’m trying to use the next middleware in order to check the authentication token in a express node.js api rest app:
import jwt from “express-jwt”;
import JwksRsa from “jwks-rsa”;
export const checkJwt = jwt ({
secret: JwksRsa.expressJwtSecret({
cache: true,
rateLimit: true,
jwksRequestsPerMinute: 5,
jwksUri: https://${process.env.AUTH0_DOMAIN}/.well-known/jwks.json
}),
// Validate the audience and the issuer
audience: process.env.AUTH0_AUDIENCE,
issuer: `https://${process.env.AUTH0_DOMAIN}/`,
algorithms: ["RS256"]
});
When executing this middleware in a docker container (made it with docker compose) always have the error response:
500 Internal Server Error
Error: getaddrinfo ENOTFOUND undefined
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:69:26)
In the Docker compose file I’m listening in the port 3000
ports:
- “3000:3000”
have I to do any special configuration in order to use Auth0 in a Doker Container?
thanks for your help