Skip to content

Conversation

@jjangminii
Copy link
Collaborator

@jjangminii jjangminii commented Dec 28, 2025

📌 Related Issues

관련된 Issue를 태그해주세요. (e.g. - close #25)

📄 Tasks

  • 환경에따른 리다이렉트 분기

⭐ PR Point (To Reviewer)

📷 Screenshot

Summary by CodeRabbit

릴리스 노트

  • Bug Fixes

    • 소셜 로그인 기능의 환경별 리디렉션 처리를 개선했습니다.
  • Chores

    • Google OAuth 리디렉션 URI 환경 설정을 최적화했습니다.

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

@jjangminii jjangminii linked an issue Dec 28, 2025 that may be closed by this pull request
@vercel
Copy link

vercel bot commented Dec 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
pinback-client-client Ready Ready Preview, Comment Dec 28, 2025 6:03pm
pinback-client-landing Ready Ready Preview, Comment Dec 28, 2025 6:03pm

@github-actions github-actions bot added the refactor 코드 리팩토링 label Dec 28, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 28, 2025

전체 요약

Google OAuth 리다이렉트 URI를 환경(PROD/DEV)에 따라 조건부로 선택하도록 변경되었습니다. VITE_GOOGLE_REDIRECT_URI_PROD 또는 VITE_GOOGLE_REDIRECT_URI_DEV 중 PROD 환경 변수 기반으로 적절한 값을 사용하며, 선택된 리다이렉트 URI를 콘솔에 로깅합니다.

변경사항

코호트 / 파일(들) 변경 요약
Google OAuth 리다이렉트 URI 환경별 분기 처리
apps/client/src/pages/onBoarding/components/funnel/step/SocialLoginStep.tsx
VITE_GOOGLE_REDIRECT_URI의 직접 사용을 PROD 환경 변수 기반 조건부 선택으로 변경: VITE_GOOGLE_REDIRECT_URI_PROD 또는 VITE_GOOGLE_REDIRECT_URI_DEV 선택. 디버깅을 위해 해결된 리다이렉트 URI를 콘솔에 로깅하는 코드 추가

예상 코드 리뷰 난이도

🎯 1 (Trivial) | ⏱️ ~3 분

관련된 PR들

  • PR #204: SocialLoginStep 컴포넌트에서 Google OAuth URL 구성 로직을 구현했으며, 본 PR에서 같은 파일의 리다이렉트 URI 선택 로직을 수정하여 직접적인 코드 연관성이 있습니다.

제안 라벨

fix

제안 리뷰어

  • jllee000
  • constantly-dev

🐰 변경을 축하하는 시

🌍 환경마다 다른 길로 가는
리다이렉트 URI의 지혜로운 선택!
PROD와 DEV가 손을 잡고,
콘솔에 그 경로를 남기네 ✨
로그인의 여정, 더욱 명확해지다! 🚀

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning PR이 이슈 #227(redirectUri 분기 처리)의 요구사항을 충족하며, 환경별 리다이렉션 URI 분기 로직이 구현되었습니다. 그러나 이슈 #25(Progress 컴포넌트)는 해당 PR의 범위와 무관합니다. PR이 이슈 #227만 참조해야 합니다. 이슈 #25는 현재 PR의 범위를 벗어나므로 관련 이슈에서 제거하거나 명확히 구분하세요.
Out of Scope Changes check ❓ Inconclusive 코드 변경이 Google 리디렉션 URI 환경별 분기 처리로 제한되어 있어 범위 내에 있으나, 이슈 #25(Progress 컴포넌트)가 linked_issues에 포함되어 있어 범위 혼동이 있습니다. linked_issues에서 이슈 #25를 제거하거나, 해당 이슈와의 연관성을 명확히 설명하세요. 현재는 PR 범위와 무관한 이슈가 포함되어 있습니다.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경 내용을 명확하게 설명하며, Google 로그인 리디렉션 URI 설정 로직 수정이라는 주요 변경사항을 정확히 반영합니다.
Description check ✅ Passed PR 설명이 필수 섹션(Related Issues, Tasks)을 포함하고 있으며, 변경 내용('환경에 따른 리다이렉트 분기')을 간결하게 설명합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/#227/redirecturi-edit

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.

@github-actions
Copy link

github-actions bot commented Dec 28, 2025

✅ Storybook chromatic 배포 확인:
🐿️ storybook

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 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 d68dabe and 87cc9fe.

📒 Files selected for processing (1)
  • apps/client/src/pages/onBoarding/components/funnel/step/SocialLoginStep.tsx
🔇 Additional comments (1)
apps/client/src/pages/onBoarding/components/funnel/step/SocialLoginStep.tsx (1)

9-11: 환경별 리다이렉트 URI 분기 로직이 올바르게 구현되었습니다.

import.meta.env.PROD를 사용한 환경별 분기 처리가 Vite의 표준 API를 올바르게 따르고 있으며, 코드 패턴도 리포지토리의 다른 부분(firebase-config.ts, axiosInstance.ts)과 일치합니다. 유효성 검사 로직도 적절하게 clientIdredirectUri 모두 존재하는지 확인하고 있습니다.

다만, 다음 사항들은 배포 시점에 확인해 주세요:

  • .env 파일에 VITE_GOOGLE_REDIRECT_URI_PRODVITE_GOOGLE_REDIRECT_URI_DEV 환경 변수가 정의되어 있는지 확인
  • Google Cloud Console에 두 리다이렉트 URI가 모두 등록되어 있는지 확인

Comment on lines +7 to +8
// const redirectUri = import.meta.env.VITE_GOOGLE_REDIRECT_URI;

Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

주석 처리된 코드를 제거하세요.

주석 처리된 코드는 버전 관리 시스템에서 관리되므로 파일에 남겨둘 필요가 없습니다. 코드 가독성을 위해 제거하는 것이 좋습니다.

🔎 제안하는 수정 사항
-    // const redirectUri = import.meta.env.VITE_GOOGLE_REDIRECT_URI;
-
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// const redirectUri = import.meta.env.VITE_GOOGLE_REDIRECT_URI;
🤖 Prompt for AI Agents
In apps/client/src/pages/onBoarding/components/funnel/step/SocialLoginStep.tsx
around lines 7-8, remove the commented-out line "// const redirectUri =
import.meta.env.VITE_GOOGLE_REDIRECT_URI;" from the file; delete the commented
code and save the file (then run the project's lint/format step if applicable to
ensure no trailing whitespace or formatting issues).

? import.meta.env.VITE_GOOGLE_REDIRECT_URI_PROD
: import.meta.env.VITE_GOOGLE_REDIRECT_URI_DEV;

console.log('redirectUri:', redirectUri);
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

프로덕션 환경에서 실행되는 console.log를 제거하세요.

OAuth 설정 정보인 리다이렉트 URI를 콘솔에 출력하는 것은 보안상 권장되지 않습니다. 프로덕션 환경에서 설정 정보가 노출될 수 있으며, 이는 잠재적인 보안 위험을 초래할 수 있습니다.

🔎 제안하는 수정 사항

옵션 1 (권장): console.log 제거

-    console.log('redirectUri:', redirectUri);
-

옵션 2: 개발 환경에서만 로깅

-    console.log('redirectUri:', redirectUri);
+    if (import.meta.env.DEV) {
+      console.log('redirectUri:', redirectUri);
+    }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
console.log('redirectUri:', redirectUri);
🤖 Prompt for AI Agents
In apps/client/src/pages/onBoarding/components/funnel/step/SocialLoginStep.tsx
around line 13, remove the console.log('redirectUri:', redirectUri) that prints
OAuth redirect URIs to the console; either delete the line entirely (preferred)
or replace it with environment-gated logging so it only runs when
process.env.NODE_ENV === 'development' (e.g., use a conditional guard) to avoid
leaking sensitive configuration in production.

@jjangminii jjangminii merged commit 512d124 into develop Dec 28, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor] redirectUri 설정

2 participants