From dc4a5921c6fbefe1fca422ace9f15ca88dedfbac Mon Sep 17 00:00:00 2001 From: chan Date: Wed, 25 Mar 2026 17:29:10 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=EC=A0=95=EC=83=81=20=EB=8F=99?= =?UTF-8?q?=EC=9E=91=EC=9D=B4=EC=A7=80=EB=A7=8C=20=EB=85=B8=EC=9D=B4?= =?UTF-8?q?=EC=A6=88=EB=A5=BC=20=EC=9C=A0=EB=B0=9C=ED=95=98=EB=8A=94=20Kra?= =?UTF-8?q?tos=20=EC=84=B8=EC=85=98=20=EC=B2=B4=ED=81=AC=20=EC=8B=A4?= =?UTF-8?q?=ED=8C=A8(401)=20=EB=A1=9C=EA=B7=B8=20=EB=A9=94=EC=8B=9C?= =?UTF-8?q?=EC=A7=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/internal/handler/auth_handler.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/backend/internal/handler/auth_handler.go b/backend/internal/handler/auth_handler.go index 3a6adbd1..0cb9f0a8 100644 --- a/backend/internal/handler/auth_handler.go +++ b/backend/internal/handler/auth_handler.go @@ -4005,11 +4005,10 @@ func (h *AuthHandler) resolveCurrentProfile(c *fiber.Ctx) (*domain.UserProfileRe if token != "" { profile, err = h.getKratosProfile(token) if err != nil && h.Hydra != nil { - // Fallback to Hydra introspection - slog.Debug("Kratos session check failed, trying Hydra", "error", err) + // Fallback to Hydra introspection. This is expected for API calls using Bearer tokens. + slog.Debug("Kratos cookie session absent, falling back to Hydra token", "error", err.Error()) profile, err = h.getHydraProfile(c.Context(), token) - } - } else if cookie != "" { + } } else if cookie != "" { profile, err = h.getKratosProfileWithCookie(cookie) } }