I followed the Node.js (Express) instructions under application / quickstart and got my first auth0 app using express working.
const { auth } = require( 'express-openid-connect' );
app.use( auth( {
authRequired: false,
auth0Logout: true,
baseURL: 'http://mydomain.local',
clientID: configuration.auth0.clientID,
secret: configuration.auth0.secret,
issuerBaseURL: 'https://xxxxxx'
} ) );
the express app runs on localhost:3000 and everything works when baseURL is set to http://localhost:3000
.
Then I created an Nginx reverse proxy for it so that https://mydomain.local
proxies tohttp://localhost:3000
and changed baseURL to https://mydomain.local
.
my current problem is that when in my browser i open https://mydomain.local/logout
, i get an error:
{
"code": 500,
"message": "id_token not present in TokenSet"
}
On the auth0 management dashboard i have both domains configured as:
Allowed Callback URLs:
http://localhost:3000/callback, https://mydomain.local/callback
Allowed Logout URLs
http://localhost:3000/, https://mydomain.local/
Allowed Web Origins
http://localhost:3000, https://mydomain.local
Allowed Origins (CORS)
http://localhost:3000, https://mydomain.local
Does anybody know what am i missing here or what did i do wrong ?
- SDK Version: express-openid-connect@2.7.2