Last active
February 1, 2021 11:58
-
-
Save letswritetw/cfdbc74c91ae4581aeae42f0163730a9 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.GoogleAuthProvider(); | |
firebase.auth() | |
.signInWithPopup(provider) | |
.then((result) => { | |
var credential = result.credential; | |
var token = credential.accessToken; | |
var user = result.user; | |
}).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