지원 프로그램
home
슬기로운 데모생활
home

Playfab 익명 로그인 지원

태그
1 more property

1. Playfab 로그인 방식

익명 로그인 매커니즘
익명 로그인 메커니즘은 사용하기 간단합니다. 플레이어 쪽에서 입력할 사항이 전혀 없으므로 최초 사용자 경험에 마찰이 없어서 결과적으로 각 플레이어마다 고유한 계정을 PlayFab에 만듭니다. 이것은 가장 일반적인 로그인 메커니즘입니다.
다음은 해당 로그인 메커니즘에 포함되는 내용입니다.

2. Playfab 인증 제공 방식

Custom ID 연동
HTTP METHOD
URL
POST

Request Header

Name
Required
Type
Description
None
True
string
This API requires no authentication headers (usually provides one to other calls).

Request Body

Name
Required
Type
Description
TitleId
True
string
Unique identifier for the title, found in the Settings > Game Properties section of the PlayFab developer site when a title has been selected.
CreateAccount
boolean
Automatically create a PlayFab account if one is not currently linked to this ID.
CustomId
string
Custom unique identifier for the user, generated by the title.
CustomTags
object
The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
EncryptedRequest
string
Base64 encoded body that is encrypted with the Title's public RSA key (Enterprise Only).
InfoRequestParameters
Flags for which pieces of info to return for the user.
PlayerSecret
string
Player secret that is used to verify API request signatures (Enterprise Only).

Responses

Name
Type
Description
200 OK
400 Bad Request
This is the outer wrapper for all responses with errors

3. STOVE 에서 제공하는 GUID(유니크 사용자 키값) 획득

PC SDK Initnialize 이후 토큰을 통해 GUID 획득 가능
GUID는 유니크한 값으로 playfab id와 1:1 매핑 가능

Get User Token Check

Resource URL

Resource URL
HTTP Method
GET

Request Document

Request Header

Header
Format
Description
Authorization
Bearer {Access Token}
플랫폼의 API를 사용하기 위한 Access Token - Web Access Token or - Game Access Token
Request Example
{ "code": 0, "message": "success", "response_data": { "guid": 200000000273, "expiration": 1629440788116 } }
JavaScript
복사

4. GUID와 Playfab ID 맵핑

Playfab 내 생성한 타이틀 ID 획득
Playfab api를 통해 Stove GUID와 맵핑

Resource URL

Resource URL
https://[PlayfabTItleID].playfabapi.com/Client/LoginWithCustomID' \
HTTP Method
POST
Content-Type
application

Request Document

Request Header

Header
Format
Description
Content-Type
application/json
-

Request Example

curl {}location{-} -request POST 'https://3E869.playfabapi.com/Client/LoginWithCustomID' \ --header 'Content-Type: application/json' \ --data-raw '{ "TitleId": "3E869", "CreateAccount": true, "CustomId": "1A003" // STOVE GUID }'
JavaScript
복사

Response Document

Response Data

Key
Data Type
Requirement
Example
Description
code
int
Y
리턴 코드 (0 : 성공)
message
String
Y
리턴 메시지
response_data
Object
N
-

신규 계정 최초 맵핑 시
{ "code": 200, "status": "OK", "data": { "SessionTicket": "A497638EEA6A9CDD--F297731E97D1985B-3E869-8DAA6ABB742AA3E-P0KwtpOwqTMSLJ8Jp71zZzt7ZPm1YoT7DkKFnY3rEg4=", "PlayFabId": "A497638EEA6A9CDD", "NewlyCreated": true, "SettingsForUser": { "NeedsAttribution": false, "GatherDeviceInfo": true, "GatherFocusInfo": true } , "EntityToken": { "EntityToken": "NHxjdi9ERnVmRnNvaUc4c0djbjVkRGJmaDh2NVN1eEFPblEwbHd3OWc0dnhFPXx7ImkiOiIyMDIyLTEwLTA1VDA4OjI5OjI3LjA1NjQ0MTRaIiwiaWRwI joiQ3VzdG9tIiwiZSI6IjIwMjItMTAtMDZUMDg6Mjk6MjcuMDU2NDQxNFoiLCJ0aWQiOiIzNzM1NzE3MjU3ZTU0MDAzYTA5ZjVlM2RmMDU2YWRjNyIsImlkaSI6IjFBMDAzIi wiaCI6IjEwMjQ2MEQ1QUU5QzQwNDciLCJlYyI6InRpdGxlX3BsYXllcl9hY2NvdW50IUVGNzFFQ0FFNTgxNUMwMDUvM0U4NjkvQTQ5NzYzOEVFQTZBOUNERC83N0E1MTYxRTI zMjRCRjAzLyIsImVpIjoiNzdBNTE2MUUyMzI0QkYwMyIsImV0IjoidGl0bGVfcGxheWVyX2FjY291bnQifQ==", "TokenExpiration": "2022-10-06T08:29:27.056Z", "Entity": { "Id": "77A5161E2324BF03", "Type": "title_player_account", "TypeString": "title_player_account" } }, "TreatmentAssignment": { "Variants": [], "Variables": [] } } }
JavaScript
복사
기존 이미 연동 된 계정 맵핑 시
{ "code": 200, "status": "OK", "data": { "SessionTicket": "A497638EEA6A9CDD--F297731E97D1985B-3E869-8DAA6AC01E99E77-MRMiyeRVBY9Wrln+muF7wgU2srt4vx80dIT96JzCyhg=", "PlayFabId": "A497638EEA6A9CDD", "NewlyCreated": false, "SettingsForUser": { "NeedsAttribution": false, "GatherDeviceInfo": true, "GatherFocusInfo": true } , "LastLoginTime": "2022-10-05T08:29:27.056Z", "EntityToken": { "EntityToken": "NHxQdjhzUFpVck1GVENhcHZwSzRZRTFMTHV6ZVdRNGZaWEc0aFRUTE9wL01vPXx7ImkiOiIyMDIyLTEwLTA1VDA4OjMxOjMyLjMwMTk4OTVaIiwiaWRwIjoiQ3VzdG9tIiwiZSI6IjIwMjItMTAtMDZUMDg6MzE6MzIuMzAxOTg5NVoiLCJ0aWQiOiIzYWIwYWE0MzNlYTA0N2IxOTNhOGZjMjkyZWM1ZWQwYyIsImlkaSI6IjFBMDAzIiwiaCI6IjEwMjQ2MEQ1QUU5QzQwNDciLCJlYyI6InRpdGxlX3BsYXllcl9hY2NvdW50IUVGNzFFQ0FFNTgxNUMwMDUvM0U4NjkvQTQ5NzYzOEVFQTZBOUNERC83N0E1MTYxRTIzMjRCRjAzLyIsImVpIjoiNzdBNTE2MUUyMzI0QkYwMyIsImV0IjoidGl0bGVfcGxheWVyX2FjY291bnQifQ==", "TokenExpiration": "2022-10-06T08:31:32.301Z", "Entity": { "Id": "77A5161E2324BF03", "Type": "title_player_account", "TypeString": "title_player_account" } }, "TreatmentAssignment": { "Variants": [], "Variables": [] } } }
JavaScript
복사