Skip to content

feat: 소셜 계정 엔티티 SocialAccount 추가 (#32) - #56

Merged
ji2081 merged 4 commits into
developfrom
feat/32-auth-social-account
Nov 2, 2026
Merged

ji2081 merged 4 commits into
developfrom
feat/32-auth-social-account

Conversation

@ji2081

@ji2081 ji2081 commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

관련 이슈

작업 내용

  • SocialAccount 엔티티·SocialProvider(GOOGLE)·레포지토리 (ERD 3-2)
  • findByProviderAndProviderUserId: 로그인 때 구글 계정 고유값(sub)으로 연결된 회원 찾기
  • 같은 소셜 계정 중복 연결은 DB 유니크로 막음

명세와 달라진 점

ERD 3-2 provider_user_id: VARCHAR(100) → VARCHAR(255)·ascii_bin.
구글 sub 규격(대소문자 구분 ASCII 최대 255자)에 맞췄고, 새 마이그레이션 V202610311700으로 반영했습니다.
참고 문서 : (https://developers.google.com/identity/openid-connect/openid-connect)

테스트

11개, 전체 ./gradlew build 통과

  • 고유값 255자 통과·256자 실패, ASCII 아닌 값 실패, 빈 값·필수 값 누락, 조회, 255자 저장·조회, 대소문자 구분 조회, 중복 연결 시 유니크 위반

확인 체크리스트

  • ./gradlew build 통과
  • 테스트 포함
  • 변경 400줄 안팎 (+277 / −3 · 운영 101, 테스트 164, 문서 12)
  • 병합된 마이그레이션 수정 안 함
  • 비밀 값·개인정보 없음
  • global 공통 코드를 바꿨다면 디스코드에 공유함 (해당 없음)

@ji2081 ji2081 self-assigned this Oct 31, 2026
@ji2081 ji2081 added feature 기능 개발 auth 로그인·가입·토큰 labels Oct 31, 2026
oTAETAEo
oTAETAEo previously approved these changes Oct 31, 2026

@oTAETAEo oTAETAEo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니당 👍

@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class SocialAccount extends BaseCreatedTimeEntity {

public static final int PROVIDER_USER_ID_MAX_LENGTH = 100;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해당 부분 providerUserId 의 최대 길이 값으로 이해 했습니다, 아래 문서 확인 해 보니까 최대 255자(영문 기준) 이라고 되어있어서 한번 확인 부탁 드립니당

https://developers.google.com/identity/openid-connect/openid-connect?hl=ko

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인 감사합니다!
첨부해주신 문서보니 sub가 최대 255자 맞아서 새 마이그레이션으로 VARCHAR(255)로 늘렸습니다.
추가로 문서에 sub가 대소문자를 구분하는 ASCII라고 명시되어있더라고요. 근데 저희 테이블 기본 정렬 규칙은 대소문자를 구분하지 않아서, 대소문자만 다른 계정을 같은 계정으로 볼 수도 있을 거 같아 컬럼을 ascii_bin으로 바꾸고 관련 테스트랑 ERD도 같이 고쳤습니다 ~

@oTAETAEo oTAETAEo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

화긴했습니당👍

@ji2081
ji2081 merged commit c102e8a into develop Nov 2, 2026
1 check passed
@ji2081
ji2081 deleted the feat/32-auth-social-account branch November 2, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auth 로그인·가입·토큰 feature 기능 개발

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants