I'm using Vue and this is my sign up method, What it does is sign up any email id... meaning it signs up even email id's that i do not own like "test@example.com" because there is no email verification..
I have configured email verification in the Firebase console. Now i want the sign up method to send a verification mail and only register the user if he/she has verified the email .
how should i modify my existing code? I'm confused.
import firebase from 'firebase'
export default {
name: 'signup',
data: function () {
return {
email: '',
password: ''
}
},
methods: {
signup: function (e) {
firebase.auth().createUserWithEmailAndPassword(this.email, this.password)
.then(user => {
alert(`Account created for ${user.user.email}`)
this.$router.go({ path: this.$router.path })
},
err => {
alert(err.message)
})
e.preventDefault()
}
}
}