пытается найти решение для обновления токена.
public function refresh()
{
$http = new Client();
$response = $http->post('http://localhost/my_project/public/oauth/token', [
'form_params' => [
'grant_type' => 'refresh_token',
'client_id' => 1,
'client_secret' => '*******',
'refresh_token' => '',
'scope' => '*',
],
]);
$data = json_decode((string)$response->getBody(), true);
return [
'access_token' => $data['access_token'],
'expires_in' => $data['expires_in']
];
}
Но я не знаю, что поставить на жетон обновления. Может кто-нибудь помочь мне, пожалуйста?