Skip to content

Fix/#197 구글 Ads OAuth 연동 이후 콜백 URL 설정 - #210

Open
jinnieusLab wants to merge 2 commits into
developfrom
fix/#197
Open

Fix/#197 구글 Ads OAuth 연동 이후 콜백 URL 설정#210
jinnieusLab wants to merge 2 commits into
developfrom
fix/#197

Conversation

@jinnieusLab

@jinnieusLab jinnieusLab commented Aug 3, 2026

Copy link
Copy Markdown
Member

📌 관련 이슈

🚀 개요

구글 Ads 플랫폼 연동 성공 후 Access Token 관련 쿠키가 세팅되지 않은 채 로그인 전용 리다이렉트 URL(/oauth2/redirect)로 이동해, 프론트가 미로그인 상태로 로그인 화면으로 튕기던 문제를 수정했습니다.

📄 작업 내용

  • GoogleAdOAuthController가 로그인 성공 리다이렉트용 프로퍼티(oauth2.redirect-url)를 재사용하던 부분을 제거하고, Google Ads 연동 전용 프론트 콜백 프로퍼티(google.ads.frontend-callback-url)를 새로 참조하도록 변경
  • application.ymlgoogle.ads.frontend-callback-url 설정 추가 (GOOGLE_ADS_FRONTEND_CALLBACK_URL 환경변수로 주입)
  • Meta 연동(META_FRONTEND_CALLBACK_URL/oauth2/meta/result)과 동일한 패턴으로, 로컬 기본값을 http://localhost:5173/oauth2/google/result로 설정
  • .env.example, 노션 환경 변수 페이지에 GOOGLE_ADS_FRONTEND_CALLBACK_URL 항목 업데이트

📸 스크린샷 / 테스트 결과 (선택)

image

로컬에서 구글 Ads 연동 성공 시 /oauth2/google/result?status=success 등으로 정상 리다이렉트

✅ 체크리스트

  • 브랜치 전략(GitHub Flow)을 준수했나요?
  • 메서드 단위로 코드가 잘 쪼개져 있나요?
  • 테스트 통과 확인
  • 서버 실행 확인
  • API 동작 확인 (구글 Ads 실제 OAuth 플로우로 검증 필요)

🔍 리뷰 포인트 (Review Points)

프론트의 수정 작업이 필요하기에, 머지 후 프론트에게 해당 url 전달 예정입니다!

💬 리뷰어 가이드 (P-Rules)
P1: 필수 반영 (Critical) - 버그 가능성, 컨벤션 위반. 해결 전 머지 불가.
P2: 적극 권장 (Recommended) - 더 나은 대안 제시. 가급적 반영 권장.
P3: 제안 (Suggestion) - 아이디어 공유. 반영 여부는 드라이버 자율.
P4: 단순 확인/칭찬 (Nit) - 사소한 오타, 칭찬 등 피드백.

Summary by CodeRabbit

  • 개선 사항
    • Google Ads OAuth 인증 완료 후 프론트엔드로 리디렉션되는 콜백 URL을 별도로 관리할 수 있습니다.
    • 배포 및 CI 환경에서 프론트엔드 콜백 URL을 명확하게 지정할 수 있습니다.

@jinnieusLab jinnieusLab self-assigned this Aug 3, 2026
@jinnieusLab jinnieusLab added the 🐛 Bug 버그 수정 label Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 41ac3f19-3c46-420e-bf0c-c267e6be2c2d

📥 Commits

Reviewing files that changed from the base of the PR and between 62587c7 and e871d64.

📒 Files selected for processing (1)
  • docker-compose.yml

Walkthrough

Google Ads OAuth 프론트엔드 콜백 URL을 환경 변수와 애플리케이션 설정으로 분리했습니다. Docker Compose와 CI가 해당 변수를 전달합니다. OAuth 컨트롤러는 전용 Google Ads 설정을 사용합니다.

Changes

Google Ads 콜백 설정

Layer / File(s) Summary
콜백 URL 환경 변수 설정
.env.example, docker-compose.yml, .github/workflows/ci.yml, src/main/resources/application.yml
GOOGLE_ADS_FRONTEND_CALLBACK_URL을 환경 예시, Docker Compose, CI에 추가했습니다. 애플리케이션 설정에서 google.ads.frontend-callback-url로 주입합니다.
컨트롤러 설정 키 연결
src/main/java/com/whereyouad/WhereYouAd/domains/advertisement/presentation/GoogleAdOAuthController.java
frontendCallbackUrloauth2.redirect-url 대신 google.ads.frontend-callback-url을 읽도록 변경했습니다.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: ojy0903

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 Google Ads OAuth 연동 이후 콜백 URL 설정 변경을 명확하게 설명하며 실제 변경 내용과 일치합니다.
Description check ✅ Passed 관련 이슈, 변경 내용, 테스트 결과, 체크리스트, 리뷰 포인트를 포함해 템플릿을 대부분 충족합니다.
Linked Issues check ✅ Passed Google Ads 전용 콜백 URL을 사용해 로그인 화면으로의 잘못된 리다이렉트를 방지하므로 #197의 핵심 목표와 일치합니다.
Out of Scope Changes check ✅ Passed 환경 변수와 콜백 URL 설정 변경만 포함하며, #197의 Google Ads OAuth 리다이렉트 수정 범위를 벗어난 변경은 확인되지 않습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/#197

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.

@kingmingyu kingmingyu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: 고생하셨어요! ci랑 yml에 추가된 거 확인했습니다! 추가로 docker-compose.yml에도 추가해야할 것 같아요!

@jinnieusLab

Copy link
Copy Markdown
Member Author

docker-compose.yml에도

넵 추가하였습니다!

@kingmingyu
kingmingyu self-requested a review August 4, 2026 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 Bug 버그 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: 구글 광고 연동 후 리디렉션 설정

2 participants