@@ -293,6 +293,8 @@ void QFieldCloudConnection::login()
293
293
{
294
294
emit loginFailed ( tr ( " Session expired" ) );
295
295
}
296
+
297
+ qInfo () << " Error reply content " << rawReply->readAll ();
296
298
}
297
299
else
298
300
{
@@ -609,6 +611,8 @@ void QFieldCloudConnection::setAuthenticationDetails( QNetworkRequest &request )
609
611
config.setConfig ( " qfieldcloud-sso-id" , providerId );
610
612
QgsApplication::instance ()->authManager ()->storeAuthenticationConfig ( config, true );
611
613
614
+ qInfo () << " Stored OAuth2 configuration " << json.toJson ();
615
+
612
616
mProviderConfigId = config.id ();
613
617
QSettings ().setValue ( QStringLiteral ( " /QFieldCloud/providerConfigId" ), mProviderConfigId );
614
618
emit providerConfigurationChanged ();
@@ -620,7 +624,10 @@ void QFieldCloudConnection::setAuthenticationDetails( QNetworkRequest &request )
620
624
providerId = config.config ( " qfieldcloud-sso-id" );
621
625
}
622
626
623
- QgsApplication::instance ()->authManager ()->updateNetworkRequest ( request, mProviderConfigId );
627
+ if ( !QgsApplication::instance ()->authManager ()->updateNetworkRequest ( request, mProviderConfigId ) )
628
+ {
629
+ qInfo () << " Authentication network request updated failed" ;
630
+ }
624
631
request.setRawHeader ( " X-QFC-IDP-ID" , providerId.toLatin1 () );
625
632
626
633
const QList<QNetworkCookie> cookies = QgsNetworkAccessManager::instance ()->cookieJar ()->cookiesForUrl ( mUrl );
@@ -630,6 +637,8 @@ void QFieldCloudConnection::setAuthenticationDetails( QNetworkRequest &request )
630
637
request.setRawHeader ( " X-CSRFToken" , match->value () );
631
638
request.setRawHeader ( " Referer" , mUrl .toLatin1 () );
632
639
}
640
+
641
+ qInfo () << " Headers " << request.headers ().toListOfPairs ();
633
642
}
634
643
}
635
644
0 commit comments