这里写问题描述
我使用开启单设备登录
旧的refresh_token还可以刷新token,导致单设备在线失效
下面是刷新,代码
public function refresh(Request $request): \support\Response
{
$tokens = JwtToken::refreshToken();
return success([
'access_token' => "Bearer " . $tokens['access_token'],
'refresh_token' => "Bearer " . $tokens['refresh_token']
], "刷新成功");
}