Skip to main content

Login Access

Client Login Access

Proceed with the following steps immediately after Step Five

Step 6: Add Callback Handling

  • You need to add the AuthResultObserver and LIEventObserver callbacks to handle login component events;

  • The callback data structure is INTLAuthResult, which contains login information and account details, such as OpenID, account binding information, and account deactivation status.

// Add callbacks
INTLAPI.AddAuthResultObserver(OnAuthResultEvent);
LevelInfinite.AddLIEventObserver(OnLIBaseEventResult);

// Handle AuthResultObserver callback result
private void OnAuthResultEvent(INTLAuthResult AuthResult)
{
switch (AuthResult.MethodId)
{
case (int)INTLMethodID.LI_LOGIN_ENTER_GAME:
if(AuthResult.RetCode == (int)ERROR_CODE.SUCCESS) {
Debug.Log("LI PASS Login success");
} else {
Debug.Log("LI PASS Login failed, ret_code = " + AuthResult.RetCode + ", ret_msg = " + AuthResult.RetMsg);
}
break;
default:
break;
}
}

// Handle LIEventObserver callback result
private void OnLIBaseEventResult(LIBaseEventResult liRet)
{
switch (liRet.lIEventType)
{
case LIEventType.GN_READY:
break;
default:
break;
}
}

Step 7: Complete LI PASS Login Process

  • Call the LoginChannelWithLIPass interface and specify the login channel to perform third-party authorized login;
LevelInfinite.LoginChannelWithLIPass(INTLChannel.Steam);
  • After third-party channel authorization, if the current account is not yet associated with an LI PASS account and the player is entering the game for the first time, the interface for associating the LI PASS account will be displayed;
  • After login is complete, if the current player's compliance process is not yet completed, they will automatically enter the LI PASS compliance process.

Step 8: Configure Third-party Channel Information

For example, Steam

For more Steam channel integration information, see Steam Channel Integration.
For more Epic channel integration information, see Epic Channel Integration.

Step 9: Other Configurations

Configure Skip Association

  • If your game does not want to force users to link their LI PASS account on first login, you can configure Skip LI PASS account link in Player Network Console;
  • If the skip association LI PASS account configuration is enabled, the LI PASS login panel will display a Skip button that players can press to skip the association.

Store Channel Number Configuration

For games planned to be listed on the Steam or Epic stores, add the store channel number in the INTLConfig.ini:

[INTL Tools]
WINDOWS_STORE_CHANNEL = 101

Backend Login Access

Please refer to Backend Integration in the integration overview.