Created
November 16, 2017 04:38
-
-
Save kobkrit/6ed60d963c343331e9f76c73d82dcd25 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
firebase.auth().signInWithCredential(credential) | |
.then((user) => { | |
console.log('facebook auth:', user); | |
this.setState({name: user.email, modalVisible: false}); | |
}) | |
.catch((error) => { | |
// Handle Errors here. | |
this.setState({name: 'Anonymous', modalVisible: true}); | |
alert("An error occured: " + error.message); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment