i want try firebase for same project with google auth.
In my react project i have a button with this onPress function =>
import firebase from 'firebase';
const provider = new firebase.auth.GoogleAuthProvider();
handleLogIn() {
firebase.auth().signInWithPopup(provider)
.then((result) => {
// ...
})
.catch(function(error) {
// ...
});
}
But this return a blank page...any suggestion?
UPDATE: with signInWithRedirect() it works
Blank page opens and closes if the user is already signed in and has provided the required permissions for the application. In that case, the app just returns the data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With