Skip to main content

Login Configuration

Developers can utilize the LI PASS interface to manage various aspects of player accounts. This includes handling the login widget, which is responsible for player registration, login, and logout.

Login Widget

LI PASS provides two distinct methods for the login widget, each designed to support different scenarios. The OpenLoginPanel method is designed for mobile games as well as Windows games that have their own launcher. The LoginChannelWithLIPass method is designed for console games like PS5 and Xbox, and for Windows games released on Steam and Epic. The following sections will introduce these methods and explain their implementation.

OpenLoginPanel

This method is suitable for games released on mobile platforms, specifically iOS and Android, as well as Windows games that have their own standalone launchers. It equips games with the ability to facilitate player login via LI PASS and more than 30 other identity providers.

Image: LI PASS Login Flow

Call the LI PASS AutoLogin method to authenticate players using the authentication state stored in the local cache. If auto-login is successful, the player will proceed into the game. However, if it fails, developers should call the OpenLoginPanel function to launch the LI PASS login widget. This feature manages LI PASS registration, login, and the compliance workflow.

Include the following code in the AuthResultObserver callback to handle auto-login outcomes.

if (AuthResult.MethodId == (int)INTLMethodID.LI_AUTOLOGIN_ENTER_GAME) {
if(AuthResult.RetCode == (int)ERROR_CODE.SUCCESS) {
Debug.Log("LI Autologin success");
} else {
Debug.Log("LI Autologin failed, ret_code = " + AuthResult.RetCode + ", ret_msg = " + AuthResult.RetMsg);
LevelInfinite.OpenLoginPanel();
}
}

This default login widget allows new players to create an LI PASS. They can then choose to use either their LI PASS account and password or their email address along with a verification code to log in to the game. Alternately, they can log in via other identity providers or guest accounts. Furthermore, it also offers a password reset function. This is illustrated in the following image:

Image: LI

For information on customizing the functions of the login widget, see Configure LI PASS.

LoginChannelWithLIPass

This method is suitable for games released on PS5 and Xbox, as well as Steam and Epic games on Windows platforms. It allows players to link their game accounts to LI PASS, but does not support linking to other third-party identity providers.

The CAPTCHA function in LI PASS is recommended to be disabled for this method, for better compatibility with the platforms. For more information about the CAPTCHA function, see CAPTCHA Configuration.

For console games on PS5 and Xbox, this method displays the LI PASS linking interface with a skip button upon game launch. Players can either link their PS5 or Xbox accounts to LI PASS, or bypass the account linking process.

Image: LI PASS console login with skip button

First-time players who choose to skip this process will see a popup reminding them to link their LI PASS. They can either continue to link an LI PASS or close the page to enter the game. Players who close the page can still link an LI PASS via the Account Center at a later stage.

Image: LI PASS console login popup after skip linking

Call the LI PASS LoginChannelWithLIPass method to activate the LI PASS login widget. The login channel should be provided as the input parameter. If the current account hasn't been linked to LI PASS and it's the player's first time entering the game, the login widget will display the user interface for LI PASS linking.

LevelInfinite.LoginChannelWithLIPass(INTLChannel.Xbox);
Image: LI PASS Login Flow

For information on customizing the functions of the login widget on the Player Network Console, see Configure LI PASS.