jwt刷新token时 JWTAuth::refresh($old_token)
报出异常The token has been blacklisted,这个是什么原因
...
public function refreshToken(Request $request){
try {
$old_token = JWTAuth::getToken();
$token = JWTAuth::refresh($old_token);
JWTAuth::invalidate($old_token);
} catch (TokenExpiredException $e) {
return response()->json(['token_expired'], $e->getStatusCode());
} catch (JWTException $e) {
return response()->json(['error' => 'could_not_create_token'], 500);
}
return response()->json(compact('token'));
}
...