Web SDK Configuration
| Initialization Parameters | Type | Description | Remarks |
|---|---|---|---|
| env | string | SDK environment, test is the testing environment.For more information, see Get Deployment Cluster Information | Required |
| gameID | number | Game ID | Required |
| appID | string | App ID, assigned by Player Network Console as ACCOUNT_APP_ID | Required |
| WebID | string | Web ID assigned by Player Network Console | Optional |
| config | object | Advanced configuration | Optional |
config
note
如果您已在 Player Network 控制台创建 LI PASS Web 的配置,只需在控制台选择配置即可,无需手动配置 config 中的大部分参数。Player Network 控制台下发的配置优先级高于 config。
The following configurations are not supported on the Player Network Console:
- langType - Not supported, can be passed during initialization as needed
- crossGameLink - No configuration needed, automatically delivered
| Parameter | Type | Description | Remarks |
|---|---|---|---|
| isMobile | boolean | Whether to display mobile UI | Optional Default: false (shows PC UI) If you want to detect the device environment yourself to dynamically set the value of isMobile, set Web Layout in Player Network Console to Custom Configuration |
| socialList | string[] | Supported third-party login channels list For example: facebook, twitter, google, apple, line, steam, epic, ps5, discord, vk, twitch, qq, wechat | Optional Default: [] |
| socialParams | object | Additional configuration for third-party login channels | Required for Apple and Kakao v3 Default: {} |
| renderMode | string | Display mode inline: normal mode modal: modal dialog mode | Optional Default: inline |
| loginWithCode | object | Verification code login configuration | Optional Default: { enable: true, registerType: 'manual'} |
| loginWithPwd | object | Password login configuration | Optional Default: { enable: true, registerType: 'manual'} |
| procedureSwitch | object | Workflow switches | Optional Default: { region: false, adultStatus: false, agreement: false, registerPassword: 'onDemand'} |
| serviceIntro | boolean | Enable LI PASS service introduction entry | Optional Default: false |
| langType | string | Default language, see Language List | Optional Default: en Not supported in Player Network Console |
| crossGameLink | boolean | Enable cross-game account linkage | Optional Default: false No configuration needed, automatically delivered |
socialParams
| Parameter | Type | Description | Remarks |
|---|---|---|---|
| appleAppId | string | Apple channel Web app ID | Required for Apple channel |
| platform | number | Specify Garena login method 1: Garena 3: Facebook 8: Google 10: Apple 11: Twitter | Optional for Garena channel |
| kakaov3AppId | string | Kakao app ID | Required for Kakao v3 channel |
| kakaov3JsKey | string | Kakao Javascript key | Required for Kakao v3 channel |
loginWithCode
| Parameter | Type | Description | Remarks | Default value |
|---|---|---|---|---|
| enable | boolean | Enable verification code login | Optional | true |
| registerType | string | Registration typemanual: only manual registration allowedauto: unregistered users can use verification code login for automatic registrationdisabled: disable registration, only existing users can log in | Optional | manual |
loginWithPwd
| Parameter | Type | Description | Remarks | Default value |
|---|---|---|---|---|
| enable | boolean | Enable password login | Optional | true |
| registerType | string | Registration typemanual: only manual registration alloweddisabled: disable registration, only existing users can log in | Optional | manual |