'How to sign up only the users who have verified their email addresses using the email link in Firebase vue?
please help me to fix where I did wrong. the code is running successfully but not working. not getting any mail from firebase anybody done it?
<script>
import { db } from '../plugins/firebase'
import firebase from 'firebase/app'
import '@firebase/auth'
export default {
data: function () {
return {
user: {
fname: '',
email: '',
password: '',
course: '',
phoneno: '',
error: ''
}
}
},
methods: {
pressed: function () {
db.collection('user').add(this.user).then(() => {
this.user.fname = ''
this.user.email = ''
this.user.password = ''
this.user.phoneno = ''
this.user.course = ''
})
firebase
.auth()
.createUserWithEmailAndPassword(this.user.email, this.user.password)
const actionCodeSettings = {
url: 'https://www.naviclearn.com/evolveI',
handleCodeInApp: true
}
firebase.auth().currentUser.sendEmailVerification(actionCodeSettings)
.then(data => {
alert('User successfully created!')
console.log(data)
this.$router.push({ name: 'evolveGo' })
})
.catch(error => {
this.error = error.message
})
}
}
}
</script>
please help me to fix where I did wrong. the code is running successfully but not working. not getting any mail from firebase anybody done it?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
