I am unable to login after signup using Universal Lock using express-id-connect
npm module and getting error.
Step 1. Trying to signup
Step 2. Consent screen
Step 3. After granting consent screen getting server_error (Unable to correlate completed consent.)
This is my authentication middleware -
const { auth } = require('express-openid-connect');
const dotenv = require('dotenv');
const path = require('path');
// Load all environment variables from .env file
dotenv.config({ path: path.join(__dirname, '..', '.env') });
module.exports = auth({
authRequired: false,
auth0Logout: true,
issuerBaseURL: process.env.ISSUER_BASE_URL,
baseURL: process.env.BASE_URL,
clientID: process.env.CLIENT_ID,
secret: process.env.SESSION_SECRET,
clientSecret: process.env.CLIENT_SECRET,
idpLogout: true,
// Define the grant flow
authorizationParams: {
response_type: 'code',
audience: process.env.AUDIENCE,
scope: 'openid profile email read:notes'
}
});
after adding audience, I get this error server_error (Unable to correlate completed consent.), but when I remove the audience the access token is not generated properly.
How can I fix this error.