You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ($loginStatus === Http::STATUS_OK && str_contains($loginBody, 'Two-factor authentication')) {
205
+
if ($loginStatus !== Http::STATUS_OK) {
206
+
$this->fail('GitHub login request to /session failed with status ' . $loginStatus . '. Response body: ' . $loginBody);
207
+
}
208
+
209
+
if (str_contains($loginBody, 'Two-factor authentication')) {
206
210
return [
207
211
'status' => '2fa_required',
208
212
'body' => $loginBody,
209
213
];
210
214
}
211
215
212
-
if ($loginStatus === Http::STATUS_OK && str_contains($loginBody, 'Incorrect username or password')) {
216
+
if (str_contains($loginBody, 'Incorrect username or password')) {
213
217
return [
214
218
'status' => 'invalid_credentials',
215
219
'body' => $loginBody,
@@ -251,7 +255,7 @@ private function handleAuthorizePage(string $authorizeUrl): string {
251
255
}
252
256
253
257
if (empty($formParams)) {
254
-
$this->fail('Could not find OAuth authorize form on page. The authorize page HTML may have changed or login did not succeed. Body: ' . $body);
258
+
$this->fail('Could not find OAuth authorize form on page. The authorize page HTML may have changed or login did not succeed. URL of the authorize page:' . $authorizeUrl . 'Body: ' . $body);
0 commit comments