Skip to content

Commit

Permalink
fix authentication using provider page and web page login flow
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Jul 9, 2024
1 parent ba155be commit 4a981fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/gui/owncloudsetupwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,9 @@ void OwncloudSetupWizard::slotConnectToOCUrl(const QString &url)
{
qCInfo(lcWizard) << "Connect to url: " << url;
AbstractCredentials *creds = _ocWizard->getCredentials();
_ocWizard->account()->setCredentials(creds);
if (creds) {

Check warning on line 336 in src/gui/owncloudsetupwizard.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/owncloudsetupwizard.cpp:336:9 [readability-implicit-bool-conversion]

implicit conversion 'OCC::AbstractCredentials *' -> bool
_ocWizard->account()->setCredentials(creds);
}

const auto fetchUserNameJob = new JsonApiJob(_ocWizard->account()->sharedFromThis(), QStringLiteral("/ocs/v1.php/cloud/user"));
connect(fetchUserNameJob, &JsonApiJob::jsonReceived, this, [this, url](const QJsonDocument &json, int statusCode) {
Expand Down
2 changes: 1 addition & 1 deletion src/gui/wizard/welcomepage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void WelcomePage::setupCreateAccountButton()
connect(_ui->createAccountButton, &QPushButton::clicked, this, [this](bool /*checked*/) {
_ocWizard->setRegistration(true);
_nextPage = WizardCommon::Page_WebView;
_ocWizard->next();
_ocWizard->setAuthType(OCC::DetermineAuthTypeJob::WebViewFlow);
});
#else // WITH_WEBENGINE
connect(_ui->createAccountButton, &QPushButton::clicked, this, [this](bool /*checked*/) {
Expand Down

0 comments on commit 4a981fd

Please sign in to comment.