Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Login.vue
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | export default { | ||||
this.$root.clearFormValidation($('form.form-signin')) | this.$root.clearFormValidation($('form.form-signin')) | ||||
axios.post('/api/auth/login', { | axios.post('/api/auth/login', { | ||||
email: this.email, | email: this.email, | ||||
password: this.password, | password: this.password, | ||||
secondfactor: this.secondFactor | secondfactor: this.secondFactor | ||||
}).then(response => { | }).then(response => { | ||||
// login user and redirect to dashboard | // login user and redirect to dashboard | ||||
this.$root.loginUser(response.data.access_token) | this.$root.loginUser(response.data) | ||||
}) | }) | ||||
} | } | ||||
} | } | ||||
} | } | ||||
</script> | </script> |