0👍
✅
Basically is the same problem which I just answered a few days ago: Show error message in Vue js
Because you lost the this
reference in .then(function (response) {..
Use arrow functions can solve this easily:
.then((response) => {
this.$router.push({
name: 'home-page',
params: {
authKey: response.data.token
}
})
})
Source:stackexchange.com