Auth

애플 로그인

웹(Apple JS SDK) 또는 iOS 앱(네이티브 Sign in with Apple)에서 발급받은 identity token(JWT)을 전달하면, Apple 공개키(JWKS)로 서명을 직접 검증한 뒤 가입/로그인을 처리하고 서비스 자체 JWT를 발급합니다. aud 클레임은 설정된 웹 Service ID 또는 앱 Bundle ID 중 하나와 일치해야 합니다. authorizationCode를 함께 전달하면 회원탈퇴 시 애플 연동 해제(revoke)에 쓸 refresh token을 미리 확보해둡니다(실패해도 로그인은 계속 진행됩니다). givenName/familyName은 애플이 최초 로그인 시에만 내려주는 값으로, 이후 로그인엔 null이어도 됩니다. 처음 로그인하는 사용자는 닉네임이 자동 생성되며(isNewUser=true), 약관 동의는 별도로 POST /api/auth/terms를 호출해야 합니다. 탈퇴했던 계정으로 다시 로그인하면 예전 계정이 되살아나지 않고 완전히 새로운 계정으로 가입됩니다(isNewUser=true) — 예전 계정과 거기 남긴 콘텐츠는 탈퇴 상태로 그대로 남습니다.

post/api/auth/apple

Request

  • Base URL: https://api-dev.pallang.co.kr
  • URL: https://api-dev.pallang.co.kr/api/auth/apple
  • Auth: HTTP bearer

Request body

identityTokenstring required
authorizationCodestring

회원탈퇴 시 애플 연동 해제(revoke)용 refresh token 확보에 사용한다. 없어도 로그인 자체는 진행된다.

givenNamestring

애플이 최초 로그인 시에만 내려주는 이름. 이후 로그인엔 null일 수 있다.

familyNamestring

애플이 최초 로그인 시에만 내려주는 성. 이후 로그인엔 null일 수 있다.

Example request

{
  "identityToken": "apple-identity-token",
  "authorizationCode": "apple-authorization-code",
  "givenName": "길동",
  "familyName": "홍"
}

Response

로그인/가입 성공

Changes

No recorded changes to this operation across all 1 revision of this API.