-
Notifications
You must be signed in to change notification settings - Fork 1
fix: Google 로그인 리디렉션 URI 설정 로직 수정 #228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -4,13 +4,18 @@ import GoogleLogo from '/assets/onBoarding/icons/googleLogo.svg'; | |||
| const SocialLoginStep = () => { | ||||
| const handleGoogleLogin = () => { | ||||
| const clientId = import.meta.env.VITE_GOOGLE_CLIENT_ID; | ||||
| const redirectUri = import.meta.env.VITE_GOOGLE_REDIRECT_URI; | ||||
| // const redirectUri = import.meta.env.VITE_GOOGLE_REDIRECT_URI; | ||||
|
|
||||
| const redirectUri = import.meta.env.PROD | ||||
| ? import.meta.env.VITE_GOOGLE_REDIRECT_URI_PROD | ||||
| : import.meta.env.VITE_GOOGLE_REDIRECT_URI_DEV; | ||||
|
|
||||
| console.log('redirectUri:', redirectUri); | ||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 프로덕션 환경에서 실행되는 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
Suggested change
🤖 Prompt for AI Agents |
||||
|
|
||||
| if (!clientId || !redirectUri) { | ||||
| alert('Google OAuth 설정이 누락되었습니다.'); | ||||
| return; | ||||
| } | ||||
|
|
||||
| const googleAuthUrl = | ||||
| `https://accounts.google.com/o/oauth2/v2/auth?` + | ||||
| `client_id=${clientId}` + | ||||
|
|
||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
주석 처리된 코드를 제거하세요.
주석 처리된 코드는 버전 관리 시스템에서 관리되므로 파일에 남겨둘 필요가 없습니다. 코드 가독성을 위해 제거하는 것이 좋습니다.
🔎 제안하는 수정 사항
📝 Committable suggestion
🤖 Prompt for AI Agents