Xbox Series X|S and WinGDK
For the WinGDK platform, only Xbox account login is supported. The login and authentication methods are the same as those for XSX, and the configuration steps are also consistent.
This document introduces how to set up Xbox Series X|S authentication, allowing your game to use Player Network's login authentication service to sign in via the Xbox Series X|S channel.
Development for Xbox Series X|S is generally not aimed at individual developers. You need to contact Microsoft through your company's business contacts to enable Xbox Series X|S development permissions.
Prerequisites
- Register a Xbox Game Dev account and refer to the steps in the official Microsoft Learn documentation to set up your game.
- Obtain a Player Network Console login account.
- Create a new project for your game, or join an existing one.
- Download SDK.
5. Integrate SDK
Please refer to the relevant documentation to integrate the SDK for your game.
For Player Network SDK V1.23.00 ~ V1.24.00, you also need to add the following content:
- Go to the engine source code:
Engine\Platforms\XSX\Source\Programs\UnrealBuildTool\UEBuildXSX.cs - Add the following two system libraries in the
SetUpEnvironment()method.LinkEnvironment.SystemLibraries.Add("advapi32.lib");
LinkEnvironment.SystemLibraries.Add("oldnames.lib"); - Recompile
UnrealBuildTools
Step 1: Add Xbox Series X|S Login
Xbox 平台推荐开发者采用 PXUID(Partner Xbox User ID)作为玩家账号体系的核心标识符。
PXUID is a next-generation user identification system designed specifically for modern cross-platform games and applications. Compared to the traditional xuid, it provides better privacy protection, improved cross-platform compatibility, and stronger long-term stability.
This choice ensures your application or game remains compatible with the evolving Xbox ecosystem while providing players with a safer and seamless cross-platform experience.
Configure the INTL_XSX_PR_URL field in the INTLConfig.ini file.
INTL_XSX_PR_URL = https://demo.intlgame.com // Domain name to configure for PXUID authentication login on the XSX platform
- Register login-related callbacks.
- Unity
- Unreal Engine
// Add callbacks
public void AddAuthObserver()
{
INTLAPI.AddAuthResultObserver(OnAuthResultEvent);
}
// Remove callbacks
public void RemoveAuthObserver()
{
INTLAPI.RemoveAuthResultObserver(OnAuthResultEvent);
}
// Process the INTLAuthResult callback
public void OnAuthResultEvent(INTLAuthResult ret)
{
Debug.Log($"MethodID: {ret.MethodId}");
string methodTag = "";
if (authRet.MethodId == (int)INTLMethodID.INTL_AUTH_LOGIN)
{
methodTag = "Login";
}
else if (authRet.MethodId == (int)INTLMethodID.INTL_AUTH_BIND)
{
methodTag = "Bind";
}
else if (authRet.MethodId == (int)INTLMethodID.INTL_AUTH_AUTOLOGIN)
{
methodTag = "AutoLogin";
}
else if (authRet.MethodId == (int)INTLMethodID.INTL_AUTH_QUERY_USER_INFO)
{
methodTag = "QueryUserInfo";
}
else if (authRet.MethodId == (int)INTLMethodID.INTL_AUTH_GET_AUTH_RESULT)
{
methodTag = "GetAuthResult";
}
}
C++ Event Handling (above v1.15)
//configure callback
FINTLAuthEvent authEvent;
authEvent.AddUObject(this, &OnAuthResult_Implementation);
UINTLSDKAPI::SetAuthResultObserver(authEvent);
// Remove callbacks
UINTLSDKAPI::GetAuthResultObserver().Clear();
void OnAuthResult_Implementation(FINTLAuthResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}
Unreal Event Handling
void OnAuthResult_Implementation(FINTLAuthResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}
- Call the
AutoLogininterface to log in automatically.
- Unity
- Unreal Engine
INTLAPI.AutoLogin();
UINTLSDKAPI::AutoLogin();
- If automatic login fails, call the
Logininterface to let the player log in manually.
- Unity
- Unreal Engine
INTLAPI.Login(INTLChannel.Xbox);
UINTLSDKAPI::Login(EINTLLoginChannel::kChannelXbox);
- Synchronize client authentication status with the game backend and wait for the final verification result.
Obtain the user ID in the Xbox system
After a successful login, Unity's INTLAuthResult and UE's FINTLAuthResult data structures will provide userId in the ChannelInfo.
"{\"code\":\"v3.xxxx\",\"issuerId\":1,\"userId\":281xxxxxx,\"map_info\":{\"sacc_uid\":\"569xxxxxxxx\",\"sacc_token\":\"3RYxxx==\",\"sacc_account_plat_type\":25},\"access_token\":\"d601xxxx-xxxx-xxxx-xxxx-3b57xxxxxxxx\",\"uid\":\"457xxxxxxxxxxxxxxxx\",\"expire_ts\":163xxxxxxx,\"refresh_token\":\"7470xxxx-xxxx-xxxx-xxxx-e488xxxxxxxx\"}"
Step 2: Accept login functionality
Search for the keyword "AuthResult" in the Player Network SDK logs to confirm whether the channel name and OpenID are returned correctly.If correct, it means the integration configuration is successful, and login functionality has been successfully added.