1
0
forked from baron/baron-sso

chore: 정상 동작이지만 노이즈를 유발하는 Kratos 세션 체크 실패(401) 로그 메시지 수정

This commit is contained in:
2026-03-25 17:29:10 +09:00
parent 5d81027b34
commit dc4a5921c6

View File

@@ -4005,11 +4005,10 @@ func (h *AuthHandler) resolveCurrentProfile(c *fiber.Ctx) (*domain.UserProfileRe
if token != "" { if token != "" {
profile, err = h.getKratosProfile(token) profile, err = h.getKratosProfile(token)
if err != nil && h.Hydra != nil { if err != nil && h.Hydra != nil {
// Fallback to Hydra introspection // Fallback to Hydra introspection. This is expected for API calls using Bearer tokens.
slog.Debug("Kratos session check failed, trying Hydra", "error", err) slog.Debug("Kratos cookie session absent, falling back to Hydra token", "error", err.Error())
profile, err = h.getHydraProfile(c.Context(), token) profile, err = h.getHydraProfile(c.Context(), token)
} } } else if cookie != "" {
} else if cookie != "" {
profile, err = h.getKratosProfileWithCookie(cookie) profile, err = h.getKratosProfileWithCookie(cookie)
} }
} }