Skip to content

Conversation

@jjaeroong
Copy link
Collaborator

@jjaeroong jjaeroong commented Jan 8, 2026

PR 타입(하나 이상의 PR 타입을 선택해주세요)

  • 기능 추가
  • 기능 삭제
  • 버그 수정
  • 의존성, 환경 변수, 빌드 관련 코드 업데이트
  • 리팩터링

반영 브랜치

ex) feat/login -> dev

작업 내용

ex) 로그인 시, 구글 소셜 로그인 기능을 추가했습니다.

테스트 결과

ex) 베이스 브랜치에 포함되기 위한 코드는 모두 정상적으로 동작해야 합니다. 결과물에 대한 스크린샷, GIF, 혹은 라이브

Summary by CodeRabbit

새로운 기능

  • Google 계정을 통한 소셜 로그인 기능이 추가되었습니다. 사용자는 Google 인증으로 애플리케이션에 간편하게 로그인할 수 있습니다.

보안

  • OAuth 인증 엔드포인트에 대한 공개 접근 권한이 추가되었습니다.

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

@jjaeroong jjaeroong merged commit 7eef492 into main Jan 8, 2026
1 of 2 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Jan 8, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

보안 설정에서 OAuth 엔드포인트("/oauth/**")를 공개 접근 범위에 추가했으며, Google OAuth 로그인 시작 흐름을 위한 검증 및 리다이렉트 로직이 포함된 새로운 엔드포인트가 UserController에 추가되었습니다.

Changes

코호트 / 파일 변경 요약
보안 설정
src/main/java/stackpot/stackpot/config/security/SecurityConfig.java
공개 접근 허용 엔드포인트에 "/oauth/" 추가 (기존: "/ws-connect/")
OAuth 로그인 엔드포인트
src/main/java/stackpot/stackpot/user/controller/UserController.java
Google OAuth 로그인 시작 엔드포인트 추가: returnUrl 검증(localhost:5173 확인), state 파라미터 인코딩, Google OAuth URL로 리다이렉트. 중복 매핑 존재

Sequence Diagram(s)

sequenceDiagram
    participant Client as 클라이언트
    participant Controller as UserController
    participant Google as Google OAuth
    
    Client->>Controller: GET /start?returnUrl=...
    activate Controller
    Controller->>Controller: returnUrl 유효성 검증<br/>(http://localhost:5173 확인)
    alt returnUrl 유효
        Controller->>Controller: returnUrl을 state에 인코딩
        Controller->>Controller: Google OAuth URL 생성<br/>(clientId + redirectUri)
        Controller-->>Client: 302 리다이렉트<br/>Google OAuth로 이동
    else returnUrl 무효
        Controller-->>Client: IllegalArgumentException 에러
    end
    deactivate Controller
    
    Client->>Google: OAuth 인증 요청
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 OAuth의 문이 열렸네,
구글 로그인 새로운 길,
returnUrl 검증하며 안전하게,
상태를 담아 리다이렉트!
보안도 단단히, 코드도 깔끔하게! 🔐✨

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ed3b676 and f538dd4.

📒 Files selected for processing (2)
  • src/main/java/stackpot/stackpot/config/security/SecurityConfig.java
  • src/main/java/stackpot/stackpot/user/controller/UserController.java

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.

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