Я пытаюсь добавить Google Войти в реагировать родное приложение.Я выполнил все шаги в официальном документе .Все работает нормально, но после входа в систему из-за ошибки:
WRONG SIGNIN {"name": "GoogleSignInError", "code": 10}
Моя страница входаэто похоже на это.
import {GoogleSignin, GoogleSigninButton} from 'react-native-google-signin';
componentDidMount(){
GoogleSignin.hasPlayServices({ autoResolve: true }).then(() => {
// play services are available. can now configure library
}).catch((err) => {
console.log("Play services error", err.code, err.message);
});
GoogleSignin.configure({
scopes: ["https://www.googleapis.com/auth/drive.readonly"],//Even if i remove this the thing is same
webClientId: "********-**********.apps.googleusercontent.com",
}).then(() => {
});
}
googleSignIn=()=>{
GoogleSignin.signIn()
.then((user) => {
console.log(user);
})
.catch((err) => {
console.log('WRONG SIGNIN error', err);
})
.done();
};
//Google button
<Button onPress={()=>this.googleSignIn()}>
<Icon style={styles.googleIcon} name="google-plus" type="FontAwesome"/>
</Button>
Моя настройка консоли разработчика Google похожа на это ![enter image description here](https://i.stack.imgur.com/PQFBE.png)
Я попытался проверить проблему на трассировщике проблем github и попробовал ихРешение, но не повезло.Может кто-нибудь сказать, пожалуйста, где я делаю неправильно?Как вы можете видеть, я использую пример кода реагирует на родной Google Signin