Skip to content
Store Dev
Last Updated

Integration Overview

This guide explains how to use the secondary authentication feature provided by STOVE (based on PC SDK3).

Feature Introduction


To verify the validity of the access token obtained via the PC SDK, you perform a secondary validation using the Token Validation API.

Prerequisites


  1. To receive a user authentication token, the Game Service Agreement for the game must be properly set and processed.
  • The Game Service Agreement can be handled by the user through the platform’s unified terms and conditions.
  1. To perform token validation, you must issue the API Token (server-to-server authentication token), which requires obtaining a Client ID and Client Secret.

Integration Flow


Sequence Diagram

Prerequisite

To receive a User Authentication Token (Access Token), the game’s Game Service Agreement must be accepted.

  1. The game client obtains the access token using PCSDK3’s Base_GetAccessToken() (Steps 5 and 6 in the diagram above)
  2. The game client sends the access token to the game server. (Step 7 in the diagram)
  3. The game server calls Game User Access Token Validation to confirm the access token is valid. (Steps 8 and 9 in the diagram)

Obtaining the Client Token


  1. The game client obtains the access token via PCSDK3 by calling Base_GetAccessToken(). (Steps 5 and 6 in the diagram)
    • The access token is valid for 6 hours.

Note

When the game server uses an access token, always call PCSDK3’s Base_GetAccessToken() on the game client to get the latest token and then send it to the server.

Use PCSDK3’s Base_GetAccessToken() function to retrieve the token information for the logged-in user.

c++
    // Allocate buffer memory to store the access token string
    wchar_t buffer[BUFFER_SIZE] = {0,};
    
    // Call Base_GetAccessToken
    auto result = Base_GetAccessToken(buffer, BUFFER_SIZE);
    if(result.IsSuccessful())
    {
        // Implement logic for successful access token retrieval
    }
    else
    {
        // Implement logic for failed access token retrieval
    }

When Base_GetAccessToken() executes successfully, the returned StovePCToken structure in Base_GetAccessToken result contains the token string.

What is a token?

It is the Game Access Token issued via the launcher when a user logs in and runs the game.
Since PCSDK3 manages token information internally, developers generally do not need to issue it directly unless required.

Game Server Token Validation


  • The game client sends the access token to the game server. (Step 7 in the diagram)
  • The game server calls the Token Validation API to verify that the user’s token is valid. (Steps 8 and 9 in the diagram)