I use the method to check the react-native ( react-native-community/google-signin ).
import { GoogleSignin } from '@react-native-community/google-signin';
// IHM
Button
title="Google Sign-In"
onPress={() => this._onGoogleButtonPressAndroid()}
/>
// JS method
_onGoogleButtonPressAndroid() {
return new Promise((resolve, reject) => {
GoogleSignin.signIn()
.then( userInfo => {
const { idToken } = userInfo
const googleCredential = auth.GoogleAuthProvider.credential(idToken);
this.props.navigation.navigate('Root')
resolve(true)
}).catch(err => {
reject(err)
})
})
}
I click on the button, I see a prompt, I select a gmail. The redirection is ok
Second step.
I delete the mail in firebase,
I restart my app,
I restart the same process,
I click on the button, I don't see a prompt. The redirection is ok but i don't see the mail ( authentification page ) in firebase.
Firebase SignIn without problem. It's normal ? My code is not correct ?
Thanks for help
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…