I am trying to implement vue-authenticate, but I'm having an issue with the following example code taken from their documentation:
new Vue({
methods: {
login: function () {
this.$auth.login({ email, password }).then(function () {
// Execute application logic after successful login
})
},
register: function () {
this.$auth.register({ name, email, password }).then(function () {
// Execute application logic after successful registration
})
}
}
})
Where is the $auth
property coming from? I can't see it defined anywhere. I've looked through the documentation, and the example code in the repo, but neither provide any help.
As you know vue-authenticate is a Vue-plugin.
And when you use this plugin using the line.
And this is where it gets defined in this file
Also you may want to go through this documentation on Adding Instance Properties.