Skip to content

Instantly share code, notes, and snippets.

@wichopy
Created April 15, 2019 21:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wichopy/c642ab2d7a090fffcb1c4e92af3fcb15 to your computer and use it in GitHub Desktop.
Save wichopy/c642ab2d7a090fffcb1c4e92af3fcb15 to your computer and use it in GitHub Desktop.
Firebase Auth
var provider = new firebase.auth.GoogleAuthProvider();
function onSigninClick () {
firebase.auth().signInWithPopup(provider).then(function (result) {
console.log('Auth resposne from firebase:', result)
})
}
function onSignoutClick () {
firebase.auth().signOut().then(function() {
console.log('Signout successful')
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment