From cec234bc533717724ea86792740ffef81250070e Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 22 Sep 2024 14:32:55 +0800 Subject: [PATCH] :bug: Fix wrong condition on check auth context is cached --- pkg/internal/services/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/internal/services/auth.go b/pkg/internal/services/auth.go index 148abb9..4bf74e4 100644 --- a/pkg/internal/services/auth.go +++ b/pkg/internal/services/auth.go @@ -59,7 +59,7 @@ func GetAuthContext(jti string) (models.AuthContext, error) { marshal := marshaler.New(cacheManager) contx := context.Background() - if val, err := marshal.Get(contx, GetAuthContextCacheKey(jti), new(models.AuthContext)); err != nil { + if val, err := marshal.Get(contx, GetAuthContextCacheKey(jti), new(models.AuthContext)); err == nil { ctx = val.(models.AuthContext) } else { ctx, err = CacheAuthContext(jti)