Created
February 1, 2021 11:58
-
-
Save letswritetw/457b960d227caf58c70e69b3a0b0f888 to your computer and use it in GitHub Desktop.
firebase-auth-google-fb
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
const provider = new firebase.auth.FacebookAuthProvider(); | |
firebase | |
.auth() | |
.signInWithPopup(provider) | |
.then((result) => { | |
var credential = result.credential; | |
var user = result.user; | |
var accessToken = credential.accessToken; | |
}) | |
.catch((error) => { | |
var errorCode = error.code; | |
var errorMessage = error.message; | |
var email = error.email; | |
var credential = error.credential; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment