diff --git a/backend/internal/handler/auth_handler.go b/backend/internal/handler/auth_handler.go index 974755c1..ecc25184 100644 --- a/backend/internal/handler/auth_handler.go +++ b/backend/internal/handler/auth_handler.go @@ -3375,13 +3375,25 @@ func (h *AuthHandler) AcceptConsentRequest(c *fiber.Ctx) error { if err := c.BodyParser(&req); err != nil { - return fiber.NewError(fiber.StatusBadRequest, "Invalid request body") + return fiber.NewError(fiber.StatusBadRequest, "Invalid request body") - } + } + + if reqJson, err := json.Marshal(req); err == nil { - if req.ConsentChallenge == "" { + slog.Info("AcceptConsentRequest: received request body", "body", string(reqJson)) + + } else { + + slog.Error("AcceptConsentRequest: failed to marshal request for logging", "error", err) + + } + + + + if req.ConsentChallenge == "" { return fiber.NewError(fiber.StatusBadRequest, "consent_challenge is required") diff --git a/userfront/lib/features/auth/presentation/consent_screen.dart b/userfront/lib/features/auth/presentation/consent_screen.dart index 679478da..33e8d1a2 100644 --- a/userfront/lib/features/auth/presentation/consent_screen.dart +++ b/userfront/lib/features/auth/presentation/consent_screen.dart @@ -160,6 +160,7 @@ class _ConsentScreenState extends State { Widget _buildConsentCard(BuildContext context) { final clientName = _consentInfo?['client']?['client_name'] ?? '알 수 없는 앱'; + final clientId = _consentInfo?['client']?['client_id'] ?? '-'; final clientLogo = _consentInfo?['client']?['logo_uri']; final requestedScopes = (_consentInfo?['requested_scope'] as List?)?.cast() ?? []; @@ -228,7 +229,15 @@ class _ConsentScreenState extends State { fontWeight: FontWeight.w600, ), ), - // 부가 설명이 있다면 여기에 표시 (Hydra 메타데이터 활용 가능) + const SizedBox(height: 4), + Text( + '클라이언트 ID: $clientId', + style: TextStyle( + fontSize: 12, + color: Colors.grey[500], + fontFamily: 'monospace', + ), + ), ], ), ), @@ -238,9 +247,22 @@ class _ConsentScreenState extends State { const SizedBox(height: 32), // 3. 권한 선택 영역 - const Text( - '요청된 권한', - style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const Text( + '요청된 권한', + style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold), + ), + Text( + '총 ${requestedScopes.length}개', + style: TextStyle( + fontSize: 14, + color: Theme.of(context).primaryColor, + fontWeight: FontWeight.w500, + ), + ), + ], ), const SizedBox(height: 8), const Divider(),