so this code was working for me great for well over two weeks with client credential oauth tokens…
function auth(server) {
const jwt = require('restify-jwt-community')
const jwks = require('jwks-rsa')
const { errs, log } = require('./utils') // eslint-disable-line
try {
const jwtCheck = jwt({
secret: jwks.expressJwtSecret({
cache: true,
rateLimit: false,
jwksUri: 'https://[mydomain].auth0.com/.well-known/jwks.json'
}),
audience: 'https://api.[mydomain].com',
issuer: 'https://[mydomain].auth0.com/',
algorithms: ['RS256']
}).unless({ path: ['/health'] })
server.use(jwtCheck)
} catch (err) {
return new errs.UnauthorizedError(err)
}
}
suddenly tonight, though, every request began throwing a 401. nothing changed in my configuration of this module and my client-side tokens are being properly generated from auth0. why would this suddenly cease to function with no change in credentials or any other factor? i have one user account.