Skip to content

Instantly share code, notes, and snippets.

@rajatk16
Created November 18, 2018 03:02
Show Gist options
  • Select an option

  • Save rajatk16/efe8196ee91a4e8afc90790b901b6b15 to your computer and use it in GitHub Desktop.

Select an option

Save rajatk16/efe8196ee91a4e8afc90790b901b6b15 to your computer and use it in GitHub Desktop.
<script>
import firebase from 'firebase'
export default {
name: 'signup',
data () {
return {
email: '',
password: ''
}
},
methods: {
signUp () {
firebase.auth().createUserWithEmailAndPassword(this.email, this.password).then((user) => {
this.$router.replace('/login')
}).catch((err) => {
alert(err.message)
});
}
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment