密码登录(LoginWithPassword)
函数定义
UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static bool LoginWithPassword(
const EINTLLoginChannel Channel,
const FString Account,
const FString PassWord,
const FString PhoneAreaCode,
const FString PermissionList = "");
入参说明
| 参数 | 类型 | 说明 |
|---|---|---|
| Channel | EINTLLoginChannel | 自建账号的渠道,与平台账号相关,如 CustomAccount,EGame 等。 |
| Account | FString | 账号,支持邮箱和手机号 |
| Password | FString | 更多信息,请参见 密码规则。 |
| PhoneAreaCode | FString | 手机区域码,例如 "86" 为中国。如果用邮件地址注册账号,字段则为空。 |
| PermissionList | FString | 权限列表。自建账号一般为空。 |
回调处理
回调处理接口是 AuthResultObserver。回调数据结构是 AuthResult。
回调 ID 是 kMethodIDAuthLogin。
代码示例
UINTLSDKAPI::LoginWithPassword(EINTLLoginChannel::kChannelCustomAccount, "youremail@sample.com", "yourpassword","");