sayren Docs
Auth

소셜 로그인 시작

공급자(`kakao`·`naver`·`google`) 로그인 주소를 돌려준다. 구매자를 그 주소로 보내면 로그인을 마친 뒤 `redirectUri`로 `?code=&state=`(실패는 `?error=&state=`)가 붙어 돌아온다. `redirectUri`는 스토어프런트 도메인 목록 안이어야 하고, `codeChallenge`는 PKCE S256 값이다. `@sayren/storefront-sdk/auth`의 `idp()`가 PKCE와 state를 만든다.

POST
/storefront/v1/auth/idp/{provider}/authorize

공급자(kakao·naver·google) 로그인 주소를 돌려준다. 구매자를 그 주소로 보내면 로그인을 마친 뒤 redirectUri?code=&state=(실패는 ?error=&state=)가 붙어 돌아온다. redirectUri는 스토어프런트 도메인 목록 안이어야 하고, codeChallenge는 PKCE S256 값이다. @sayren/storefront-sdk/authidp()가 PKCE와 state를 만든다.

AuthorizationBearer <token>

회원 accessToken

In: header

Path Parameters

provider*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

redirectUri*string
Formaturi
codeChallenge*string
Match^[A-Za-z0-9_-]{43}$
state*string
Length16 <= length <= 128

Response Body

application/json

curl -X POST "https://example.com/storefront/v1/auth/idp/string/authorize" \  -H "Content-Type: application/json" \  -d '{    "redirectUri": "http://example.com",    "codeChallenge": "string",    "state": "stringstringstri"  }'
{  "meta": {    "status": 0,    "code": "OK",    "message": "string",    "isSuccess": true  },  "data": {    "url": "http://example.com"  },  "error": null}