Skip to Content
Sayren 유저가이드
회원 인증

소셜 로그인 마무리

돌아온 1회용 `code`와 PKCE `codeVerifier`를 구매자 토큰으로 바꾼다. code는 1분 안에 한 번만 쓸 수 있다. 처음 로그인한 공급자 계정이면 구매자가 새로 가입된다. 같은 이메일의 기존 구매자와 자동으로 합치지 않는다. `cartToken`을 주면 비회원 장바구니를 합친다. 약관 동의는 authorize에서 받으므로 여기서는 보내지 않는다.

POST
/storefront/v1/auth/idp/token

돌아온 1회용 code와 PKCE codeVerifier를 구매자 토큰으로 바꾼다. code는 1분 안에 한 번만 쓸 수 있다. 처음 로그인한 공급자 계정이면 구매자가 새로 가입된다. 같은 이메일의 기존 구매자와 자동으로 합치지 않는다. cartToken을 주면 비회원 장바구니를 합친다. 약관 동의는 authorize에서 받으므로 여기서는 보내지 않는다.

Authorization

headerAuthorizationBearer <JWT>

회원 accessToken

Request Body

application/json
  1. body
code*string
Length1 <= length
codeVerifier*string
Match^[A-Za-z0-9._~-]{43,128}$
cartToken?string

Response Body

성공

application/json
  1. response
meta*
data*
error*|null
Example Request
curl -X POST 'https://api.sayren.io/storefront/v1/auth/idp/token' \
  -H 'Content-Type: application/json' \
  -d '{
  "code": "string",
  "codeVerifier": "string"
}'
Example Response
{
  "meta": {
    "status": 200,
    "code": "OK",
    "message": "OK",
    "isSuccess": true
  },
  "data": {
    "accessToken": "string",
    "refreshToken": "string",
    "expiresIn": 0
  },
  "error": null
}