Skip to content

Commit

Permalink
Add workaround for login process
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrimaud committed May 18, 2020
1 parent b939b84 commit 96ad4cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Instagram/Auth/Login.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ public function execute($username, $password)

$query = $this->client->request('POST', TransportFeed::AUTH_URL, [
'form_params' => [
'username' => $username,
'password' => $password,
'username' => $username,
'enc_password' => '#PWD_INSTAGRAM_BROWSER:0:' . time() . ':' . $password,
],
'headers' => [
'cookie' => 'ig_cb=1; csrftoken=' . $data->config->csrf_token,
'referer' => TransportFeed::BASE_URL,
'x-csrftoken' => $data->config->csrf_token,
'user-agent' => TransportFeed::USER_AGENT,
],
'cookies' => $cookieJar
'cookies' => $cookieJar
]);

if ($query->getStatusCode() !== 200) {
Expand All @@ -78,4 +78,4 @@ public function execute($username, $password)
}
}
}
}
}

1 comment on commit 96ad4cf

@gokor8
Copy link

@gokor8 gokor8 commented on 96ad4cf May 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works. For C# code Looks like
#PWD_INSTAGRAM_BROWSER:0:1590954226:Password. I set static time, and this works

Please sign in to comment.