-
Notifications
You must be signed in to change notification settings - Fork 806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow compiling without QtWebEngine & remove webflow v1 #3353
Conversation
Also, I'm not sure how to handle diff --git a/src/gui/wizard/owncloudsetuppage.cpp b/src/gui/wizard/owncloudsetuppage.cpp
index 1d20e092d..b6dafbdc2 100644
--- a/src/gui/wizard/owncloudsetuppage.cpp
+++ b/src/gui/wizard/owncloudsetuppage.cpp
@@ -232,8 +232,10 @@ int OwncloudSetupPage::nextId() const
return WizardCommon::Page_OAuthCreds;
case DetermineAuthTypeJob::LoginFlowV2:
return WizardCommon::Page_Flow2AuthCreds;
+#ifdef WITH_WEBENGINE
case DetermineAuthTypeJob::WebViewFlow:
return WizardCommon::Page_WebView;
+#endif
}
return WizardCommon::Page_HttpCreds;
}
diff --git a/src/gui/wizard/owncloudwizardcommon.h b/src/gui/wizard/owncloudwizardcommon.h
index 30b4dfb80..a6908898b 100644
--- a/src/gui/wizard/owncloudwizardcommon.h
+++ b/src/gui/wizard/owncloudwizardcommon.h
@@ -46,7 +46,9 @@ namespace WizardCommon {
Page_HttpCreds,
Page_OAuthCreds,
Page_Flow2AuthCreds,
+#ifdef WITH_WEBENGINE
Page_WebView,
+#endif
Page_AdvancedSetup,
Page_Result
};
diff --git a/src/libsync/networkjobs.h b/src/libsync/networkjobs.h
index 1b0e212d4..f1adf6743 100644
--- a/src/libsync/networkjobs.h
+++ b/src/libsync/networkjobs.h
@@ -446,7 +446,9 @@ public:
NoAuthType, // used only before we got a chance to probe the server
Basic, // also the catch-all fallback for backwards compatibility reasons
OAuth,
+#ifdef WITH_WEBENGINE
WebViewFlow,
+#endif
LoginFlowV2
};
Q_ENUM(AuthType) |
Likewise with Or we could just make |
V2: incorporate feedback from @mgallien. Additionally, since the preferred_providers app currently only supports webflow v1 auth to my knowledge, make that option for the client ( |
V3: add missing includes for |
@tobiasKaminsky @mgallien should we really bother with introducing a compile option for flow1? I think it Flow1 is not used anymore. Should we then not drop it completely? This will also make the code easier to read and maintain. |
@sroracle After discussing internally: Could you remove the flow1 code entirely? We then only need the web engine for the providers page. When WITH_WEBENGINE is disabled, the providers page should be displayed in the users web browser instead of |
Thanks for taking the time to discuss it. I will rework it next week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As explained by @FlexW , please modify the PR to remove WebFlow1 and request again review when you are done ?
6430805
to
48ef852
Compare
V6: silence error from clang-tidy by removing no-longer-needed usage of DetermineAuthTypeJob. |
The only component that still uses QtWebEngine at this point is the providers functionality (WITH_PROVIDERS). However, you can now also set WITH_WEBENGINE=OFF and the providers functionality (if enabled) will still work - it will just open a link in the external browser instead. Fixes: nextcloud#856 nextcloud#932 Supersedes: nextcloud#1808 nextcloud#2204 Signed-off-by: Max Rees <maxcrees@me.com>
AppImage file: Nextcloud-PR-3353-68939a9f9b23bb5df3097a11e803c4e92bff4adf-x86_64.AppImage |
_askDialog->setInfo(msg); | ||
QString msg = tr("You have been logged out of %1 as user %2. Please login again.") | ||
.arg(_account->displayName(), _user); | ||
_askDialog->setInfo(msg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated changes
|
||
_askDialog->show(); | ||
_askDialog->show(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated changes
QString path = url.path() + "/index.php/login/flow"; | ||
url.setPath(path); | ||
_askDialog->setUrl(url); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove the auth job? I think you shouldn't remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can tell it was dead code since it's only needed to distinguish whether flowv1 is needed over v2. Do you want an error message or something in that case instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me, it looks like it also checked if basic authentication is needed.
I will have some more comments. I just couldn't finish it today. |
@sroracle I've realized that it might be not feasible at the moment to remove the flow1 entirely. There were some problems that I wasn't aware of. Sorry for this. To move this forward a little bit quicker I created another pull request that allows compiling without QWebEngine. We need that pull request to make it possible to compile native clients for Apple M1. I would like to close this pull request in favour of the other. I'm sorry that we then will not be able to merge your pull request, but your pull request helped me to get the other pull request implemented quicker. Please continue to contribute to the desktop client. If you need some inspiration for other issues you could solve, just tell me, I will then give you some ;) New pull request: #3471 |
Still enabled by default
Fixes: #856 #932
Supersedes: #1808 #2204
Signed-off-by: Max Rees maxcrees@me.com
Based on the feedback from #2204 I reworked things so that Flow2 auth is still usable. Indeed it does not require QtWebEngine at all; only Flow1 does. I think the areas I'm not sure about here are the two places where I fall back on using OAuth - should those be Flow2, OAuth, or Basic?
I wrote this based on the 3.2.1 release then rebased it onto master. I verified that Flow2 auth works from the 3.2.1 version. More testing would be appreciated.