Skip to content

Fix/apple login#311

Merged
Hank-Choi merged 4 commits intodevelopfrom
fix/apple-login
Jan 10, 2025
Merged

Fix/apple login#311
Hank-Choi merged 4 commits intodevelopfrom
fix/apple-login

Conversation

@SeonghaeJo
Copy link
Contributor

  • 로컬 테스트 통과하게끔 AppleClient 수정
  • extractJwtHeader 메서드 수정: signing key 명시하지 않으면 에러가 발생하여 base64 디코딩으로 헤더 추출
  • apple jwk 응답 포맷에 맞게 webClient.get에 사용되는 타입 수정
  • login_apple 레거시 엔드포인트 추가
  • 애플 로그인 관련 docs 추가

@SeonghaeJo SeonghaeJo requested review from a team and PFCJeong as code owners January 5, 2025 13:16
@SeonghaeJo SeonghaeJo requested review from Hank-Choi, asp345 and davin111 and removed request for a team January 5, 2025 13:16
Copy link
Member

@Hank-Choi Hank-Choi left a comment

Choose a reason for hiding this comment

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

코멘트 몇개만 봐주세요

Comment on lines 170 to 193
RouterOperation(
path = "/v1/auth/login_apple",
method = [RequestMethod.POST],
produces = [MediaType.APPLICATION_JSON_VALUE],
operation =
Operation(
operationId = "loginAppleLegacy",
requestBody =
RequestBody(
content = [
Content(
schema = Schema(implementation = SocialLoginRequest::class),
mediaType = MediaType.APPLICATION_JSON_VALUE,
),
],
),
responses = [
ApiResponse(
responseCode = "200",
content = [Content(schema = Schema(implementation = LoginResponse::class))],
),
],
),
),
Copy link
Member

Choose a reason for hiding this comment

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

레거시는 레거시니까 docs에서 빼주세요
괜히 두개 있으면 위에꺼 쓸 수도 있고 더 헷갈려요

Comment on lines 59 to 60
val kid = headerMap["kid"] as? String ?: throw IllegalArgumentException("유효하지 않은 애플 로그인 토큰")
val alg = headerMap["alg"] as? String ?: throw IllegalArgumentException("유효하지 않은 애플 로그인 토큰")
Copy link
Member

Choose a reason for hiding this comment

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

예상 가능한 상황이니 Snu4tException 만들어서 던지는건 어떨까요

Comment on lines 61 to 64
return mapOf(
"kid" to kid,
"alg" to alg,
)
Copy link
Member

Choose a reason for hiding this comment

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

이것도 AppleClient 내부에 internal data class 만들어서 관리하면 좋을 것 같아요

@Hank-Choi Hank-Choi merged commit 0b58d1f into develop Jan 10, 2025
2 checks passed
@asp345 asp345 deleted the fix/apple-login branch August 21, 2025 10:07
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.

3 participants