Merge pull request #1480 from LennyMcLennington/oauth2-token-error-diagnostic

change: Added diagnostic logging for OAuth 2.0 token reply errors, an…
This commit is contained in:
LennyMcLennington 2022-10-24 23:14:52 +01:00 committed by GitHub
commit 2bf9c0dcf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -230,6 +230,15 @@ void DeviceFlow::onDeviceAuthReplyFinished()
qWarning() << "DeviceFlow::onDeviceAuthReplyFinished: Mandatory parameters missing from response";
updateActivity(Activity::FailedHard);
}
} else {
qWarning() << "DeviceFlow::onDeviceAuthReplyFinished: Token reply error:" << tokenReply->errorString();
QVariantMap params = parseJsonResponse(tokenReply->readAll());
foreach (QString key, params.keys()) {
qDebug() << "\t" << key << ": " << params.value(key).toString();
}
updateActivity(Activity::FailedHard);
}
tokenReply->deleteLater();
}