当我登录时,似乎我的数据响应不同我很困惑因为我正在寻找access_token和refresh_token但是这里唯一可用的X-CSRF-TOKEN和X-XSRF-TOKEN那么就没有其他了令牌
BTW,我正在使用vue js,我想将access_token存储到localStorage。此外,我还使用默认的laravel身份验证登录
export default{
$validates: true,
data(){
return{
login:{
username : '',
password : '',
remember : ''
},
disabled: 0,
indeterminate : false,
showLoader: false
}
},
methods:{
submit(){
this.showLoader = true;
this.$validator.validateAll().then((result) => {
if(result){
console.log(this.login.username);
/*axios.post('/prod/login', this.login)
.then(response => console.log(response));*/
axios({
method:'post',
url : '/prod/login',
data: {
email : this.login.username,
password : this.login.password,
remember : this.login.remember
},
responseType: 'JSON'
})
.then(response=>{
if(response.status == 200){
console.log(response);
}
})
.catch(error => {
if (error.response) {
console.log(error.response);
}
});
console.log('submited');
return;
}
console.log('mali e');
});
}
},
mounted(){
}
}