0👍
I don’t understand why you’re executing all of the code (at least all that you show) in an error handler, but the reason you can’t access the Vue context is the error handler [reformatted for clarity]:
firebase.auth()
.createUserWithEmailAndPassword(this.email, this.password)
.catch(function(error) {
// all your code is here
})
You can make the context match by changing that to an arrow function:
firebase.auth()
.createUserWithEmailAndPassword(this.email, this.password)
.catch((error) => {
// all your code is here
})
Source:stackexchange.com