Skip to content

Third-party Platform

This section introduces how to use a third party to log in an account.

Feature Description

kotlin
QuecUserService

One-Tap Login

API

Configure QuecOneKeyLoginModel to start one-tap login. All the fields are required.

kotlin
fun oneKeyLogin(model: QuecOneKeyLoginModel, callback: QuecCallback<Unit>)

QuecOneKeyLoginModel Definition

FieldTypeDescription
appidStringApply appid on China Mobile Internet Capability Open Platform.
msgidStringUUID.
strictcheckString0: Do not perform strict check on the server IP whitelist.
1: Perform strict check on the server IP whitelist.
systemtimeStringSystem time with format of yyyyMMddHHmmssSSS.
appSecretStringApply appSecret on China Mobile Internet Capability Open Platform.
loginTokenStringAfter obtaining the permission, the SDK of China Mobile returns a token.
versionStringVersion.

Example

kotlin
QuecUserService.oneKeyLogin(
    QuecOneKeyLoginModel(
        "xxx",
        "xxx",
        "xxx",
        "xxx",
        "0",
        "20250421154210030",
        "2.0"
    )
) {
    if (it.isSuccess) {
        //Configure QuecOneKeyLoginModel to start one-tap login successfully.
    } else {
        val code = it.code //Failed. Error code.
        val msg = it.msg //Failed. Error message.
    }
}

Log in with Third Party

API

Log in with the third party.

kotlin
fun loginByAuthCode(authCode: String, callback: QuecCallback<Unit>)

Parameter

ParameterRequiredDescription
authCodeYAuthorization code.
callbackYCallback function of the request.

Example

kotlin
QuecUserService.loginByAuthCode("authCode") {
    if (it.isSuccess) {
        //Log in with the third party successfully.
    } else {
        val code = it.code //Failed. Error code.
        val msg = it.msg //Failed. Error message.
    }
}