Skip to content

Instantly share code, notes, and snippets.

@rajatk16
Created November 18, 2018 02:51
Show Gist options
  • Save rajatk16/74a26b9f69315e2657eafdb7339e4a0c to your computer and use it in GitHub Desktop.
Save rajatk16/74a26b9f69315e2657eafdb7339e4a0c to your computer and use it in GitHub Desktop.
<script>
import firebase from 'firebase'
export default {
name: 'login',
data: function() {
return {
email: '',
password: ''
}
},
methods: {
login () {
firebase.auth().signInWithEmailAndPassword(this.email, this.password).then((user) => {
this.$router.replace('/comics')
}).catch((err) => {
alert(err.message)
})
}
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment