使用vue-cli進行前后端分離開發(fā),比如現(xiàn)在前端進行登錄操作,后端返回了token:return response()->json([ 'access_token' => $tokenResult->accessToken, 'token_type' => 'Bearer', 'expires_at' => Carbon::parse(
$tokenResult->token->expires_at
)->toDateTimeString()
]);問題:1、前端拿到后端返回的token后,每次發(fā)起請求都要帶上token嗎?2、因為token要過期,所以是不是后端每個方法都要返回token?
vue-cli前后端分離項目的token問題
慕俠2389804
2018-09-24 16:47:03