Open almod90 opened 2 years ago
Actually, my assumption is that on new instagram visit (e.g. in incognito tab) it asks to accept cookies, and only then mid cookie is set via https://www.instagram.com/data/shared_data/
ajax request
Have the same issue here, but I noticed the cookie notice (e.g. on https://instagram.com/accounts/login/) does not show up, when the ig_did cookie ist set. The value for it should be the device id available in shared_data I think. Then the mid-cookie should be set in response.
I could bypass the cookie notice by calling https://graphql.instagram.com/graphql/ to "register" (?) the device id and then calling e.g. https://instagram.com/accounts/login/ to get the midCookie. It can look like this:
src/Instagram/Auth/Login.php:L83
$this->client->request('POST', 'https://graphql.instagram.com/graphql/', [
'headers' => [
'content-type' => 'application/x-www-form-urlencoded',
],
'body' => http_build_query([
'doc_id' => 3810865872362889,
'variables' => json_encode([
"ig_did" => $data->device_id,
"first_party_tracking_opt_in" => true,
"third_party_tracking_opt_in" => false,
"input" => [
"client_mutation_id" => 0
]
]),
])
]);
$this->client->request('GET', 'https://instagram.com/accounts/login/', [
'headers' => [
'cookie' => 'ig_did=' . $data->device_id . '; csrftoken=' . $data->config->csrf_token . ';',
'x-csrftoken' => $data->config->csrf_token,
],
'cookies' => $cookieJar,
]);
But maybe they changed to whole process, because then I just get an error "Warning: Undefined property: stdClass::$Challenge" ( src/Instagram/Auth/Checkpoint/Challenge.php:L91 ) because there is not challenge in extra_data?
same problem
same problem
Same error here. There is no "mid" cookie, so getValue();
in src/Instagram/Auth/Checkpoint/Challenge.php:69
fails.
Version(s) affected: 6.15.1
Description
Running example with challenge with my own credentials results in the following error:
There are actually no 'mid' cookie inside cookieJar
If I remove everything related with midCookie process walks through, but the code is not sent to email in the end.
Tested this on the 5.6 (php7.3) and 9.2 (php 8.1) laravel versions both the same result