我已经将@hmscore/react-native-hms-account
实现到我的react native应用程序中,以使用华为帐号登录。
当我使用 id token 登录时,我想强制执行 获取您的电子邮件地址
选项。但目前,该选项存在,但默认未选中。
我也在传递 authScopeList: [HMSAuthScopeListConstants.EMAIL]
范围。
是否可以将获取您的电子邮件地址
作为强制性默认选择选项?
谢谢。
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/