소셜 로그인 시작
공급자(`kakao`·`naver`·`google`) 로그인 주소를 돌려준다. 구매자를 그 주소로 보내면 로그인을 마친 뒤 `redirectUri`로 `?code=&state=`(실패는 `?error=&state=`)가 붙어 돌아온다. `redirectUri`는 스토어프론트 도메인 목록 안이어야 하고, `codeChallenge`는 PKCE S256 값이다. `@sayren/storefront-sdk/auth`의 `idp()`가 PKCE와 state를 만든다. 이 로그인으로 **가입이 되는 경우** 남길 약관 동의는 `agreements`로 함께 보낸다(기존 회원 로그인이면 무시한다). 보내지 않아도 가입은 되고, 그 구매자는 `GET /me`의 `reconsentRequired`가 true라 첫 진입에서 받으면 된다.
공급자(kakao·naver·google) 로그인 주소를 돌려준다. 구매자를 그 주소로 보내면 로그인을 마친 뒤 redirectUri로 ?code=&state=(실패는 ?error=&state=)가 붙어 돌아온다. redirectUri는 스토어프론트 도메인 목록 안이어야 하고, codeChallenge는 PKCE S256 값이다. @sayren/storefront-sdk/auth의 idp()가 PKCE와 state를 만든다. 이 로그인으로 가입이 되는 경우 남길 약관 동의는 agreements로 함께 보낸다(기존 회원 로그인이면 무시한다). 보내지 않아도 가입은 되고, 그 구매자는 GET /me의 reconsentRequired가 true라 첫 진입에서 받으면 된다.
AuthorizationBearer <JWT>회원 accessToken
provider*stringapplication/json- body
redirectUri*stringuricodeChallenge*string^[A-Za-z0-9_-]{43}$state*string16 <= length <= 128agreements?성공
application/json- response
meta*data*error*|nullcurl -X POST 'https://api.sayren.io/storefront/v1/auth/idp/string/authorize' \
-H 'Content-Type: application/json' \
-d '{
"redirectUri": "http://example.com",
"codeChallenge": "string",
"state": "stringstringstri"
}'{
"meta": {
"status": 200,
"code": "OK",
"message": "OK",
"isSuccess": true
},
"data": {
"url": "http://example.com"
},
"error": null
}