fix(handler/reverseproxy): add nil check for session

Co-authored-by: sindrerh2 <sindre.rodseth.hansen@nav.no>
This commit is contained in:
Trong Huu Nguyen
2025-01-23 10:16:13 +01:00
co-authored by sindrerh2
parent 837323d728
commit ab418c456c
+1 -1
View File
@@ -124,7 +124,7 @@ func (rp *ReverseProxy) Handler(src ReverseProxySource, w http.ResponseWriter, r
if isAuthenticated {
ctx = mw.WithAccessToken(ctx, accessToken)
if rp.IncludeIdToken {
if rp.IncludeIdToken && sess != nil {
idToken := sess.IDToken()
ctx = mw.WithIdToken(ctx, idToken)
}