@heybox/hb-sdk API Reference - v0.9.5
    正在准备搜索索引...

    接口 LoginOptions

    auth.login 的可选配置。

    整个参数、省略的 scopes 和 scopes: undefined 都表示只申请平台隐式包含的 identity。配置中不接收小程序 ID、用户 ID、手势标记、应用密钥或 token;这些值由 Host 的可信上下文提供,不能由页面覆盖。

    interface LoginOptions {
        scopes?: ("identity" | "profile" | "steam_account")[];
    }
    索引

    属性

    属性

    scopes?: ("identity" | "profile" | "steam_account")[]

    要申请的可选资料 scope。

    通常只在需要昵称和头像时传 ['profile'];identity 无需显式填写。空数组不会产生 匿名授权,成功结果仍包含 identity。数组中的值必须属于 LoginScope 且不能 重复;JavaScript 调用传入未知值、重复值、null 或非数组值时,Promise 以 HbMiniProgramSDKError.code === 'INVALID_PARAMS' 拒绝。 steam_account 虽属于公开类型,仍要求 Host 支持并启用 Steam 账号能力。

    undefined,即只申请隐式的 identity。