Search
Duplicate

Authentication Integration

생성일
2024/03/13 23:22
태그
할 일
완료한 할 일

Pre-checklist

1.
You must be in agreement with the game's Terms of Service to receive a user authentication token.
Stove SDK function based on native
1.
The Game Client acquires the access token through the Stove Client SDK. (Steps 6 and 7 of the above image)
2.
The Game Client passes the access token to the game server. (Step 8 of the above image)
3.
The game server verifies the validity of the user by calling the provided web API “Get User Token Check”. (Steps 9 and 10 of the above image)

Get Access Token

1.
The game client obtains the access Token through the PC SDKGetToken() (step 5 in the figure above).
The access token is valid for 6 hours.
The PC SDK has a new access Token via the OnRenewToken() callback before the expiration of the validity period.
2.
If all goes well, the OnToken() callback is called, and the StovePCToken structure contains the token string (step 6 in the figure above).
Cautions To use an access Token on the game server, The game client must call the PC SDK's GetToken()' function to obtain the latestaccess Token' and pass it to the game server for use. Use the GetToken() function of the PC SDK to get the token information of the logged-in user.
StovePCResult result = StovePC_GetToken(); if (result == StovePCResult::STOVE_PC_NO_ERROR) { /*Success Process*/ }
C++
복사
If the GetToken() function processes successfully, the OnToken() callback is called.
The StovePCToken structure passed to the callback contains the token string.
void OnToken(const StovePCToken token) { /*Token Information Output*/ printf("Token : %s", token.accessToken); }
C++
복사
What's a token? It's the key information issued through the launcher login. Since the token information is managed inside the PC SDK, the developer will have no need to use this unless for special reasons

Access Token Validation - Game Server

The game client passes the access token to the game server. (Step 7 in the figure above)
The game server calls [Game User Access Token Validation] (/en/pc/server/auth/api_user_token_verify.md) to validate the user. (Steps 8 and 9 in the image above)