feat: 애플 OAuth 로그인 기능 추가 #127
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.
🔍 개요
🚀 주요 변경 내용
애플 OAuth 로그인 기능을 추가했습니다.
로그인 시 최초 1회만 이메일을 제공하고
provider_id를 통해 개인 식별을 해서 유저 관련 테이블에 컬럼을 추가했습니다.인증 성공 후 코드 교환은
JWT방식으로 진행하여 관련 클래스를 생성했습니다.JWT의 시크릿 키 같은 경우p8이라는 파일을 제공하여 서버에 올려둘 예정입니다.🔄 로그인 플로우
사용자가 애플 로그인 버튼 클릭 → 애플 인증 페이지로 이동
애플이
authorization code를 백엔드 콜백으로 전달백엔드가
client_secret(JWT)생성 후code교환OIDC를 파싱해서sub(provider_id)등 사용자 정보 획득성공 핸들러에서 사용자 조회
/home리다이렉트unregistered_user저장/조회 후 세션(이메일/프로바이더/프로바이더ID) 구성 →/signup리다이렉트/signup 호출 시 세션 값으로 회원가입 완료 → 정상 유저 세션 생성
💬 참고 사항
애플은 정책상 개발 환경에서 테스트 시
localhost를 사용할 수 없어ngrok을 통해 임시 도메인을 발급받고 yml 파일의backend.base-url경로를 변경 후 확인해주셔야 합니다.테스트 시
p8파일도 같이 다운받아야 합니다.✅ Checklist (완료 조건)