feat(user): MePayload에 소셜 로그인 provider(linkedIdentities) 노출#92
Conversation
소셜 로그인 provider(GOOGLE/KAKAO) 정보를 프론트에서 확인할 수 있도록 IdentityProvider enum과 LinkedIdentity 타입을 노출한다. 한 계정에 여러 identity 연결 가능성을 고려해 배열로 정의하고, lastLoginAt까지 포함해 "최근 로그인 provider" UI 구성도 가능하게 한다.
UserRepository.findAccountWithProfile에서 account_identities를 함께 조회(soft-deleted 제외, last_login_at desc 정렬)하도록 include를 추가하고, toMePayload에서 provider/lastLoginAt만 추려 노출한다. provider_subject나 provider_email 등 OIDC 내부 식별자는 의도적으로 노출하지 않는다.
UserProfileService.me에 4가지 케이스(빈 배열/단일/다건 정렬/soft-deleted 제외) + resolver 단에서 새 필드가 그대로 노출되는 통합 케이스 1건을 추가한다. 모두 real DB로 검증.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Coverage report
Test suite run success882 tests passing in 78 suites. Report generated by 🧪jest coverage report action from 59ba8ca |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…t spec 추가 호출부(UserBaseService.requireActiveUser)가 항상 withDeleted:true로 호출하여 서비스 spec으로는 falsy 브랜치가 도달되지 않는다. soft-delete extension과의 상호작용 contract를 명시적으로 못박는다. codecov/patch 80% 미달(66.67%) 해소 목적도 겸한다.
Summary
MePayload에linkedIdentities: [LinkedIdentity!]!필드 추가. 각 항목은provider(GOOGLE/KAKAO) +lastLoginAt.account_identity1:N)에 맞춰 배열로 노출. 현재는 길이 1이 일반적이지만 추후 multi-provider 연동 시 breaking change 없이 확장 가능.provider_subject/provider_email등 OIDC 내부 식별자는 의도적으로 비노출.Changes
user-profile.graphql:IdentityProviderenum,LinkedIdentitytype,MePayload.linkedIdentities추가UserRepository.findAccountWithProfile:account_identitiesinclude (soft-deleted 제외,last_login_at desc정렬)UserBaseService.toMePayload: provider/lastLoginAt만 추려 매핑Test plan
yarn tsc --noEmit통과yarn lint통과me { linkedIdentities { provider lastLoginAt } }조회 동작 확인