Repository navigation
Conversation
- /auth/google/login, /auth/google/callback (허용 도메인 화이트리스트 게이트) - account.google_id 컬럼 마이그레이션 + linkedProviders GitHub/Google 조합 - getGoogleAccessToken/getGoogleUser 헬퍼 (userinfo 엔드포인트, 미검증 이메일 거부) - 웹 Continue with Google 버튼 + google_domain_not_allowed 에러, GitHub 버튼 검정 통일 - 테스트 4종: 로그인 리다이렉트/도메인 허용·거부/기존 계정 연결 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
배경
GOOGLE_ALLOWED_DOMAIN)를 게이트로 사용한다.변경 사항
routes/auth.ts— Google OAuth 라우트 2개 신설GET /auth/google/login(인증 화면 리다이렉트) +GET /auth/google/callback(code→토큰→userinfo→게이트→세션)GOOGLE_ALLOWED_DOMAIN(콤마 구분)에 없으면google_domain_not_allowed거부. 미설정 시 전부 거부 (안전 기본값)googleId만 연결, 없으면 신규 생성(ENABLE_ACCOUNT_REGISTRATION준수)middleware/auth.ts— Google API 헬퍼getGoogleAccessToken(토큰 교환) /getGoogleUser(userinfo)email_verified: false거부 — 게이트가 이메일 기반이므로DB —
account.google_id컬럼 (마이그레이션0004_add_google_id.sql)d1.ts: 계정 매핑 3곳 중복을mapAccountFromDB로 통합하며 googleId 반영,linkedProviders를 GitHub/Google 조합으로 계산웹
LoginPage.tsx/config.ts— Continue with Google 버튼(G 로고 SVG, outline) +google_domain_not_allowed에러 메시지, GitHub 버튼 primary(파랑) → 검정 통일설정 —
env.ts에 GOOGLE_* 3종(전부 optional, 기존 배포 env 무영향), wrangler.toml local/production에 CLIENT_ID·ALLOWED_DOMAIN, vitest 바인딩에 테스트값 고정(실채널 발신 차단 규칙)테스트
참고
google_id마이그레이션 적용 +GOOGLE_CLIENT_SECRET시크릿 등록 + Google Console 리디렉션 URI(로컬/실서버) 등록 — 머지 후 main 배포만 하면 동작.dev.vars(git-ignored)와 wrangler secret에만 존재, 커밋에 없음🤖 Generated with Claude Code