In general, the situation is as follows:
It is necessary to authorize via VC, if you log in, cookies are not set, and if you repeat the operation, everything works with the same code. This is not the first time - the situation was somehow solved by itself, but now I don’t know what to do.
Maybe someone came across?
UPD:
if (isset($_POST['token'])) { session_start(); $s = file_get_contents('Запрос данных'); $user = json_decode($s, true); $id = $user['identity']; $name = $user['first_name']; $lastname = $user['last_name']; $secondPastOfYear = 15778463; // Ставим куки SetCookie('id', $id, time() + $secondPastOfYear, "/"); SetCookie('name', $name, time() + $secondPastOfYear, "/"); SetCookie('lastname', $lastname, time() + $secondPastOfYear, "/"); }