react-native - 华为帐号登录: Scope email address option getting as unselected

标签 react-native account huawei-mobile-services huawei-developers huawei-account

我已经将@hmscore/react-native-hms-account实现到我的react native应用程序中,以使用华为帐号登录。

当我使用 id token 登录时,我想强制执行 获取您的电子邮件地址 选项。但目前,该选项存在,但默认未选中。

我也在传递 authScopeList: [HMSAuthScopeListConstants.EMAIL] 范围。

是否可以将获取您的电子邮件地址作为强制性默认选择选项?

enter image description here

谢谢。

signInWithIdToken = () => {
  let signInData = {
    accountAuthParams: HMSAuthParamConstants.DEFAULT_AUTH_REQUEST_PARAM,
    authRequestOption: [
      HMSAuthRequestOptionConstants.ID_TOKEN,
      HMSAuthRequestOptionConstants.ACCESS_TOKEN,
    ],
    authScopeList: [HMSAuthScopeListConstants.EMAIL],
  };
  HMSAccountAuthService.signIn(signInData)
    .then((response) => {
      this.logger('Sign In With IdToken -> ', response);
      console.log(response);
    })
    .catch((err) => {
      this.errorLogger('Sign In With IdToken -> ', err);
    });
};

最佳答案

经团队确认,邮箱地址为用户个人隐私信息。所以用户需要选择是否对邮箱地址进行授权。

因此,该选项默认不选中,不能强制默认选中。

关于react-native - 华为帐号登录: Scope email address option getting as unselected,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69300978/

相关文章:

android - 如何改造: translate element through whole screen on Android?

reactjs - 在嵌套的功能组件 React Native 中键入 TextInput 时键盘关闭

react-native - 如何重置 react 导航 v5 中的状态?

帐户名中的Mysql句点字符

android - Google Play 不接受任何依赖华为的应用程序包

huawei-mobile-services - 如何在Android Studio Bumblebee (2021.1.1) Patch 1)中集成HMS Kit?

react-native - 如何通过api获取rct-image-store的图片URL来上传图片

asp.net - 创建帐户后不让用户登录

visual-studio - 如何从 Visual Studio 向 GitHub 正确注册我的用户名

R 需要一个包 (hms) 来导入数据集。我安装该软件包没有任何反应。我该如何正确安装它?