Skip to content

Commit

Permalink
bug: fix redis client nil (#410)
Browse files Browse the repository at this point in the history
Signed-off-by: Sarah Funkhouser <[email protected]>
  • Loading branch information
golanglemonade authored Jan 24, 2025
1 parent 4bf6792 commit 0f022e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/httpserve/serveropts/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0f022e4

Please sign in to comment.