Skip to content

feat(user): MePayload에 소셜 로그인 provider(linkedIdentities) 노출#92

Merged
chanwoo7 merged 4 commits into
developfrom
feat/user-mypage-expose-social-provider
May 20, 2026
Merged

feat(user): MePayload에 소셜 로그인 provider(linkedIdentities) 노출#92
chanwoo7 merged 4 commits into
developfrom
feat/user-mypage-expose-social-provider

Conversation

@chanwoo7
Copy link
Copy Markdown
Member

@chanwoo7 chanwoo7 commented May 20, 2026

Summary

  • MePayloadlinkedIdentities: [LinkedIdentity!]! 필드 추가. 각 항목은 provider(GOOGLE/KAKAO) + lastLoginAt.
  • 한 계정에 여러 identity 연결 가능한 스키마(account_identity 1:N)에 맞춰 배열로 노출. 현재는 길이 1이 일반적이지만 추후 multi-provider 연동 시 breaking change 없이 확장 가능.
  • provider_subject/provider_email 등 OIDC 내부 식별자는 의도적으로 비노출.

Changes

  • user-profile.graphql: IdentityProvider enum, LinkedIdentity type, MePayload.linkedIdentities 추가
  • UserRepository.findAccountWithProfile: account_identities include (soft-deleted 제외, last_login_at desc 정렬)
  • UserBaseService.toMePayload: provider/lastLoginAt만 추려 매핑
  • 테스트: 4 케이스 (빈 배열 / 단일 / 다건 정렬 / soft-deleted 제외) + resolver 통합 1 케이스

Test plan

  • 신규 케이스 포함 user 도메인 전체 214/214 통과
  • auth 도메인 109/109 통과 (영향 없음 확인)
  • yarn tsc --noEmit 통과
  • yarn lint 통과
  • FE에서 me { linkedIdentities { provider lastLoginAt } } 조회 동작 확인

chanwoo7 added 3 commits May 21, 2026 01:47
소셜 로그인 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로 검증.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 87f211e8-f6cc-4500-9725-e6283742bd27

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/user-mypage-expose-social-provider

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 20, 2026

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 96.71% 2911/3010
🟢 Branches 86.57% 1657/1914
🟢 Functions 93.36% 619/663
🟢 Lines 97.04% 2655/2736

Test suite run success

882 tests passing in 78 suites.

Report generated by 🧪jest coverage report action from 59ba8ca

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

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%) 해소 목적도 겸한다.
@chanwoo7 chanwoo7 merged commit 29bc270 into develop May 20, 2026
9 checks passed
@chanwoo7 chanwoo7 deleted the feat/user-mypage-expose-social-provider branch May 20, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant