Skip to main content

Third-Party Channel Login

caution

LI PASS Web login for third-party channels is only supported for the system browser, and is not supported for the built-in WebView component of any game or app:

  • Based on security concerns, Google and Facebook has prohibited the use of built-in WebView for web login.
  • The WebView component cannot load two pages at the same time, and therefore the third-party login page cannot be loaded to complete the login process.

To support third-party channel login, set up third-party channels in the Player Network Console. Take Facebook as an example Configuration Guide - Facebook.

LI PASS Web widget supports using third-party channels to log in.

The LI PASS Web widget currently supports Apple, Discord, Epic, Facebook, Google, LINE, PS5, Steam, Twitch, Twitter, VK.

<div id="infinite-pass-component"></div>
const pass = new PassFactory.Pass({
env: "test", // Environment
gameID: "", // Game ID
appID: "", // Account App ID

config: {
socialList: ['facebook', 'twitter']
}
});

// Call `Start` to mount the widget to the specified DOM node
// After successful login, the login result is in intlSignResp
pass.start("#infinite-pass-component").then((userInfo) => {
console.log("userInfo: ", userInfo);
});

Key Configuration Parameters

ParameterTypeDescriptionRemarks
socialListstring[]Third-party channels:
apple
discord
epic
facebook
google
line
ps5
steam
twitch
twitter
vk
Optional

Return Parameter

ParameterTypeDescription
retnumberReturn code
0: Request success
!=0: Request failure, see msg for detailed return message
msgstringResult description
tokenstringPlayer Network SDK generated user authorization token
length 40 bytes, see Token
openidstringPlayer Network SDK unique user ID
Default is a string of 64-bit unsigned integers, 32-bit is also supported
token_expire_timeint64Token expiration time
Unix time
user_namestringUsername used for login
birthdaystringUser's birthday
channel_infoobjectChannel information for the current channel.
For more information, see Channel Information.
del_account_statusnumberDelete account
-1: Query failure
0: No record of cancellation of Player Network account deletion request (including email account and phone account)
1: Cooling-off period for deletion
2: Account deletion completed
3: Account deleted
4: Account deletion failed
seqstringData stream message sequence number

Return Sample

{
birthday: "",
channel_info: {
access_token:"xxxxx",
expire_ts: 1641527900,
}
first_login: 0,
gender: 0,
msg: "success",
need_name_auth: false,
openid: "xxxx",
pf: "facebook_fb-00000000-web-00000000-fb-xxxxxxxxxxxxxxxx-419213088809929925",
pf_key: "6cc9bxxxxxxxxxxxxxxxxxx826",
picture_url: "https://www.google.com/Images/profileA.png",
ret: 0,
seq: "1638935899-1006943754-018668-0000656615",
token: "xxx",
token_expire_time: 1641527900,
del_account_status: 0,
uid: "xxxx",
user_name: "user",
}