From 0f022e4663a15b92ce65a2b63d79ec65ac7a7e27 Mon Sep 17 00:00:00 2001 From: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> Date: Fri, 24 Jan 2025 14:11:39 -0700 Subject: [PATCH] bug: fix redis client nil (#410) Signed-off-by: Sarah Funkhouser <147884153+golanglemonade@users.noreply.github.com> --- internal/httpserve/serveropts/option.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/httpserve/serveropts/option.go b/internal/httpserve/serveropts/option.go index 588d3805..f571eea0 100644 --- a/internal/httpserve/serveropts/option.go +++ b/internal/httpserve/serveropts/option.go @@ -292,6 +292,9 @@ func WithSessionManager(rc *redis.Client) ServerOption { // set cookie config to be used sessionConfig.CookieConfig = cc + // Add redis client to Handlers Config + s.Config.Handler.RedisClient = rc + // Make the cookie session store available // to graph and REST endpoints s.Config.Handler.SessionConfig = &sessionConfig @@ -325,7 +328,6 @@ func WithOTP() ServerOption { Version: 0, Key: s.Config.Settings.TOTP.Secret, }), - totp.WithRedis(s.Config.Handler.RedisClient), } // append redis client if enabled