Skip to content

Conversation

@minjee2758
Copy link
Collaborator

@minjee2758 minjee2758 commented Jan 15, 2026

PR 생성 시 아래 항목을 채워주세요.

제목 예시: feat : Pull request template 작성

(작성 후 이 안내 문구는 삭제해주세요)


작업 내용

  • 어떤 기능(또는 수정 사항)을 구현했는지 간략하게 설명해주세요.
  • 예) "회원가입 API에 이메일 중복 검사 기능 추가"

변경 사항

  • 구현한 주요 로직, 클래스, 메서드 등을 bullet 형식으로 기술해주세요.
  • 예)
    • UserService.createUser() 메서드 추가
    • @Email 유효성 검증 적용

트러블 슈팅

  • 구현 중 마주한 문제와 해결 방법을 기술해주세요.
  • 예)
    • 문제: @Transactional이 적용되지 않음
    • 해결: 메서드 호출 방식 변경 (this.AopProxyUtils. 사용)

해결해야 할 문제

  • 기능은 동작하지만 리팩토링이나 논의가 필요한 부분을 적어주세요.
  • 예)D
    • UserController에서 비즈니스 로직 일부 처리 → 서비스로 이전 고려 필요

참고 사항

  • 기타 공유하고 싶은 정보나 참고한 문서(링크 등)가 있다면 작성해주세요.

코드 리뷰 전 확인 체크리스트

  • 불필요한 콘솔 로그, 주석 제거
  • 커밋 메시지 컨벤션 준수 (type : )
  • 기능 정상 동작 확인

Summary by CodeRabbit

  • 설정 변경
    • OAuth2 인증 리다이렉트 주소가 업데이트되었습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 15, 2026

워크스루

OAuth2 컨트롤러의 리다이렉트 URL 호스트를 ezcode.my에서 api.ezcode.my로 변경합니다. 메서드 시그니처와 제어 흐름에는 변경이 없으며, 리다이렉트 메커니즘은 동일하게 작동합니다.

변경 사항

코호트 / 파일 변경 사항
OAuth2 리다이렉트 URL 호스트 업데이트
src/main/java/org/ezcode/codetest/presentation/usermanagement/OAuth2Controller.java
OAuth2 리다이렉트 URL의 호스트 부분을 ezcode.my에서 api.ezcode.my로 변경

추정 코드 리뷰 노력

🎯 1 (Trivial) | ⏱️ ~2 minutes

관련 가능성 있는 PR들

  • hotfix #140: OAuth2Controller의 redirectToProvider 메서드에서 리다이렉트 URL 호스트를 ezcode.my로 설정했던 PR로, 이 PR이 호스트를 api.ezcode.my로 업데이트하므로 직접적으로 연관되어 있습니다.

추천 리뷰어

  • thezz9
  • Kimminu7

🐰 호스트를 바꿔봤네, api로 이동하고
리다이렉트 경로 반짝반짝
한 줄의 변화, 커다란 의미
작지만 확실한 그 변화
토끼가 응원해! 🌟

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive PR 제목이 너무 모호하고 구체적이지 않아 변경 사항의 주요 내용을 명확히 전달하지 못합니다. 제목을 'OAuth2 redirect URL host를 api.ezcode.my로 변경' 또는 유사한 구체적인 표현으로 수정하여 실제 변경 사항을 명확히 나타내세요.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

🧹 Recent nitpick comments
src/main/java/org/ezcode/codetest/presentation/usermanagement/OAuth2Controller.java (3)

48-54: 하드코딩된 호스트를 설정으로 외부화하는 것을 권장합니다.

api.ezcode.my 호스트가 하드코딩되어 있어 환경(dev, staging, production)별로 다른 도메인을 사용하기 어렵습니다. @Value 또는 application.yml을 통해 설정값으로 관리하면 유지보수성과 유연성이 향상됩니다.

♻️ 설정 외부화 제안
// application.yml에 추가
// oauth2:
//   api-host: api.ezcode.my

`@Value`("${oauth2.api-host}")
private String oauthApiHost;

// 메서드 내에서 사용
String target = UriComponentsBuilder.newInstance()
    .scheme("https")
    .host(oauthApiHost)
    .path("/oauth2/authorization/" + provider)
    .build()
    .toUriString();

37-54: provider 파라미터 검증을 추가하는 것을 고려해주세요.

provider path variable이 검증 없이 직접 URL 경로에 사용되고 있습니다. 허용된 provider (예: google, github)만 처리하도록 검증을 추가하면 예상치 못한 요청을 방지할 수 있습니다.

♻️ Provider 검증 추가 제안
 `@GetMapping`("/authorize/{provider}")
 public void redirectToProvider(
     `@PathVariable` String provider,
     HttpServletRequest request,
     HttpServletResponse response,
     `@RequestParam`(required = false) String redirect_uri
 ) throws IOException {
+    List<String> allowedProviders = List.of("google", "github");
+    if (!allowedProviders.contains(provider.toLowerCase())) {
+        response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Unsupported OAuth provider");
+        return;
+    }
+
     if (redirect_uri != null && isValidRedirectUri(redirect_uri)) {
         request.getSession().setAttribute("redirect_uri", redirect_uri);
     }

58-61: 허용된 도메인 목록도 설정으로 외부화하면 좋습니다.

현재 allowedDomains가 메서드 내에 하드코딩되어 있습니다. 위 호스트 설정과 마찬가지로 application.yml에서 관리하면 환경별 설정이 용이해집니다.


📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9f0c443 and 408eff8.

📒 Files selected for processing (1)
  • src/main/java/org/ezcode/codetest/presentation/usermanagement/OAuth2Controller.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@minjee2758 minjee2758 merged commit d18107c into dev Jan 15, 2026
2 checks passed
@minjee2758 minjee2758 deleted the refactor/oauth branch January 15, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants