fix: Google OIDC 오류 수정 및 test.html static 이동#34
Merged
Conversation
- Google scope에 openid 추가, Kakao scope에 account_email 추가 - application-prod.yml에 forward-headers-strategy: framework 추가 (리버스 프록시 HTTPS 인식) - application-prod.yml에 cookie.secure: false 추가 (HTTP 환경에서 refresh token 쿠키 정상 전달) - deploy.yml docker run에 SPRING_PROFILES_ACTIVE=prod 및 모든 환경변수 주입 추가 - docker 포트 매핑 8080:8080 → 8081:8080 수정 (소셜 redirect URI 등록 포트 일치) - DB_URL을 DB_HOST, DB_PORT, AUTH_DB_NAME 시크릿으로 조합하도록 수정 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- test.html이 gitignore에 포함되어 있어 빌드 JAR에 누락, 500 오류 발생 - static 폴더로 이동 시 Spring Boot가 정적 리소스로 서빙 - gitignore에서 test.html 제외 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
openid scope 추가 시 Google이 OIDC 모드로 동작하여 OidcUserService가 사용됨 → CustomOAuth2UserService 호출 안 됨 → authentication.getName()이 UUID가 아닌 Google subject ID 반환 → UUID.fromString() 예외 → /login?error 리다이렉트 profile + email scope만으로 이름/이메일 정상 수신 가능 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
기존에는 OAuth2 실패 시 /login?error로 리다이렉트 되었으나 해당 경로에 핸들러가 없어 401 반환 → 실패 시 프론트 콜백 URL에 ?error= 파라미터로 리다이렉트하도록 수정 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
openidscope 제거: OIDC 모드 진입 시CustomOAuth2UserService가 호출되지 않아UUID.fromString(Google subject ID)예외 발생 →/login?error리다이렉트 문제 수정test.html을src/main/resources/static/으로 이동: gitignore로 인해 JAR에 미포함 → 500 오류 수정/test.html,/swagger-ui.htmlpermitAll 추가.gitignore에서test.html제거Root Cause
openidscope → Spring이 OIDC 모드로 전환 →OidcUserService사용 →authentication.getName()이 Google subject ID(숫자) 반환 →UUID.fromString()예외Test plan
http://15.164.112.64:8081/test.html접근 확인🤖 Generated with Claude Code