mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-05 23:26:42 +00:00
misc: added comment regarding session and redis usage
This commit is contained in:
@@ -22,6 +22,12 @@ export const registerOidcRouter = async (server: FastifyZodProvider) => {
|
|||||||
const appCfg = getConfig();
|
const appCfg = getConfig();
|
||||||
const redis = new Redis(appCfg.REDIS_URL);
|
const redis = new Redis(appCfg.REDIS_URL);
|
||||||
const passport = new Authenticator({ key: "oidc", userProperty: "passportUser" });
|
const passport = new Authenticator({ key: "oidc", userProperty: "passportUser" });
|
||||||
|
|
||||||
|
/*
|
||||||
|
- OIDC protocol cannot work without sessions: https://github.com/panva/node-openid-client/issues/190
|
||||||
|
- Current redis usage is not ideal and will eventually have to be refactored to use a better structure
|
||||||
|
- Fastify session <> Redis structure is based on the ff: https://github.com/fastify/session/blob/master/examples/redis.js
|
||||||
|
*/
|
||||||
const redisStore = new RedisStore({
|
const redisStore = new RedisStore({
|
||||||
client: redis,
|
client: redis,
|
||||||
prefix: "oidc-session:",
|
prefix: "oidc-session:",
|
||||||
|
|||||||
Reference in New Issue
Block a user