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)