mongo-express icon indicating copy to clipboard operation
mongo-express copied to clipboard

Mongo Express Authentication with Microsoft Identity Fails: 'Issuer.discover() failed – unable to get local issuer certificate'

Open minhtoanbosch opened this issue 11 months ago • 0 comments

I config mongo express authentication with

ME_CONFIG_MONGODB_ADMINUSERNAME=root ME_CONFIG_MONGODB_ADMINPASSWORD=example ME_CONFIG_MONGODB_URL=mongodb://root:example@mongo:27017/ ME_CONFIG_OIDCAUTH_ENABLED=true ME_CONFIG_OIDCAUTH_BASEURL=http://localhost:8081 ME_CONFIG_OIDCAUTH_ISSUER=https://login.microsoftonline.com//v2.0 ME_CONFIG_OIDCAUTH_CLIENTID= ME_CONFIG_OIDCAUTH_CLIENTSECRET= ME_CONFIG_OIDCAUTH_SECRET=some-random-string ME_CONFIG_SITE_COOKIESECRET=another-random-string ME_CONFIG_SITE_BASEURL=/

and I got the issue

Welcome to mongo-express 1.1.0-rc-3

Mon, 12 May 2025 12:25:05 GMT express-session deprecated req.secret; provide secret option at file:/opt/mongo-express/lib/router.js:110:17 Mongo Express server listening at http://0.0.0.0:8081 Server is open to allow connections from anyone (0.0.0.0) AggregateError: Issuer.discover() failed. RequestError: unable to get local issuer certificate RequestError: unable to get local issuer certificate at Issuer.discover (/opt/mongo-express/node_modules/openid-client/lib/issuer.js:265:17) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async get (/opt/mongo-express/node_modules/express-openid-connect/lib/client.js:42:18) at async ResponseContext.login (/opt/mongo-express/node_modules/express-openid-connect/lib/context.js:205:34) AggregateError: Issuer.discover() failed. RequestError: unable to get local issuer certificate RequestError: unable to get local issuer certificate at Issuer.discover (/opt/mongo-express/node_modules/openid-client/lib/issuer.js:265:17) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async get (/opt/mongo-express/node_modules/express-openid-connect/lib/client.js:42:18) at async ResponseContext.login (/opt/mongo-express/node_modules/express-openid-connect/lib/context.js:205:34) AggregateError: Issuer.discover() failed. RequestError: unable to get local issuer certificate RequestError: unable to get local issuer certificate at Issuer.discover (/opt/mongo-express/node_modules/openid-client/lib/issuer.js:265:17) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async get (/opt/mongo-express/node_modules/express-openid-connect/lib/client.js:42:18) at async ResponseContext.login (/opt/mongo-express/node_modules/express-openid-connect/lib/context.js:205:34) AggregateError: Issuer.discover() failed. RequestError: unable to get local issuer certificate RequestError: unable to get local issuer certificate at Issuer.discover (/opt/mongo-express/node_modules/openid-client/lib/issuer.js:265:17) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async get (/opt/mongo-express/node_modules/express-openid-connect/lib/client.js:42:18) at async ResponseContext.callback (/opt/mongo-express/node_modules/express-openid-connect/lib/context.js:353:34)

minhtoanbosch avatar May 12 '25 12:05 minhtoanbosch