[FEATURE] 카카오 및 애플 소셜 로그인 구현 #65
Merged
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.
목적
카카오와 애플 소셜 로그인 기능을 구현하여 사용자가 간편하게 로그인할 수 있도록 합니다.
구현 내용
1. OAuth 클라이언트
KakaoOAuthClient
AppleOAuthClient
2. 소셜 로그인 서비스
SocialLoginService
3. 컨트롤러 및 DTO
SocialLoginController
DTO
4. LoginService 개선
5. 설정 및 인프라
주요 파일/모듈
로그인 흐름
API 명세
카카오 로그인
POST /api/auth/social/kakao Content-Type: application/json { "accessToken": "카카오 Access Token", "deviceId": "optional-device-id" }Response:
{ "accessToken": "JWT Access Token", "refreshToken": "JWT Refresh Token", "deviceId": "device-id" }애플 로그인
POST /api/auth/social/apple Content-Type: application/json { "accessToken": "애플 Identity Token (JWT)", "deviceId": "optional-device-id" }Response:
{ "accessToken": "JWT Access Token", "refreshToken": "JWT Refresh Token", "deviceId": "device-id" }수용 기준 검증
테스트
빌드 및 테스트 결과
./gradlew build BUILD SUCCESSFUL ./gradlew test BUILD SUCCESSFUL 전체 테스트 통과수동 테스트 방법
카카오 로그인 테스트
애플 로그인 테스트
Provider 정책
중복 가입 방지
신규 사용자 처리
브레이킹/마이그레이션
Breaking Change: 없음
새로운 기능 추가이므로 기존 기능에 영향 없음
설정 가이드
자세한 설정 방법은 docs/SOCIAL_LOGIN_SETUP.md 참조
카카오 설정 요약
애플 설정 요약
코드 강점
1. 확장 가능한 구조
2. 에러 처리
3. 재사용성
4. 문서화
참조
체크리스트