🐛 Hotfix panic when getting auth context from cache

This commit is contained in:
2024-10-07 00:53:23 +08:00
parent 94c15f58ec
commit 0f18c6ff16
3 changed files with 4 additions and 4 deletions

View File

@ -60,7 +60,7 @@ func GetAuthContext(jti string) (models.AuthContext, error) {
contx := context.Background()
if val, err := marshal.Get(contx, GetAuthContextCacheKey(jti), new(models.AuthContext)); err == nil {
ctx = val.(models.AuthContext)
ctx = *val.(*models.AuthContext)
} else {
ctx, err = CacheAuthContext(jti)
log.Debug().Str("jti", jti).Msg("Created a new auth context cache")