Error: NOAUTH Authentication required.
d3vv3 opened this issue · comments
devve commented
I have a redis instance with password, and it outputs Error: NOAUTH Authentication required.
.
const { auth, requiresAuth, attemptSilentLogin, claimEquals } = require('express-openid-connect');
const RedisStore = require('connect-redis')(auth); // Error might be coming from this line
let redisClient = createClient({ legacyMode: true, url: "redis://redis:6379", password: process.env.REDIS_PASSWORD });
redisClient.connect().catch(console.error); // Error is not coming from this line
app.use(
auth({
...
session: {
store: new RedisStore({ client: redisClient }), // Error might be coming from this line
},
...
devve commented
Okay I found it, issue was with:
let redisClient = createClient({ legacyMode: true, url: "redis://redis:6379", password: process.env.REDIS_PASSWORD });
Instead use: redis://default:password@redis:6379