In addition, calling /userinfo is not working for me, this code:
const auth0CallOptions = { url: 'https://DOMAIN.auth0.com/userinfo', auth: { bearer: req.headers.authorization.split(' ')[1], }, }; const auth0Callback = (error, response, body) => { if (!error) { console.log(body); // <==== Prints Unauthorized } else { console.log(error); } };
Results in a 401: Unauthorized