4

我已经实现@hmscore/react-native-hms-account了我的反应本机应用程序以使用华为 ID 登录。

当我使用 id 令牌登录时,我希望获得强制obtain your email address选项。但目前,该选项存在,但默认未选中。

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

是否有可能获得obtain your email address强制默认选择选项?

在此处输入图像描述

谢谢你。

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);
    });
};
4

1 回答 1

3

As confirmed by the team, the email address is the user's personal privacy information. So user needs to choose whether to authorize the email address.

Therefore, this option is not selected by default and cannot be mandatory default selected option.

于 2021-09-24T07:37:27.260 回答