-
Notifications
You must be signed in to change notification settings - Fork 10
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
A URL change is all that is needed #3
Comments
oh, cool! can you submit a PR or describe the URL? If that works I can try and do a new build / Play Store submission. |
in client/WFClient.java: 33 public static final String LOGIN_URL = "https://workflowy.com/ajax_login"; 348 if (code != 200 || cookie.isEmpty() || sessionId == null) { Sorry. I understand the premise behind Github but it would probably take me so much longer to figure out how to submit the PR than just paste the few changes. It's in the fork here: https://github.com/soraiyu/WorkflowyList/tree/feature/fix_url |
Any chance this fix can be implemented and a new Google Play app put up? I'm sure I'm not the only one who really likes this app and would love to see it back. Unfortunately I logged out of my old version and now can't log in again :( Thanks! |
A couple things:
|
It's not quite just a URL change that's required, but here is the patch I'm using (plus copious modifications to get it to build in current Android Studio, though the GUI will mostly walk you through that): diff --git a/app/src/main/java/com/rmnoon/workflowy/client/WFClient.java b/app/src/main/java/com/rmnoon/workflowy/client/WFClient.java
index 5ec7e7438..bbce5401d 100644
--- a/app/src/main/java/com/rmnoon/workflowy/client/WFClient.java
+++ b/app/src/main/java/com/rmnoon/workflowy/client/WFClient.java
@@ -30,7 +30,7 @@ public class WFClient {
public static final Logger log = Logger.getLogger(WFClient.class.getName());
- public static final String LOGIN_URL = "https://workflowy.com/accounts/login/";
+ public static final String LOGIN_URL = "https://workflowy.com/ajax_login";
public static final String API_URL = "https://workflowy.com/%s";
public static final String USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36";
public static final int TIMEOUT_MS = 2500;
@@ -334,7 +334,6 @@ public class WFClient {
.post(new FormBody.Builder()
.add("username", username)
.add("password", password)
- .add("next", "")
.build()
)
.build();
@@ -342,10 +341,9 @@ public class WFClient {
int code = res.code();
Map<String, String> cookie = Utils.parseCookie(res.header("Set-Cookie"));
- String locationHeader = res.header("Location");
String sessionId = cookie.get("sessionid");
- if (code != 302 || cookie.isEmpty() || !String.format(API_URL, "").equals(locationHeader) || sessionId == null) {
+ if (code != 200 || cookie.isEmpty() || sessionId == null) {
throw new BadLoginException();
}
synchronized (this) { The summary is that the new login endpoint is located at |
maybe is it possible to release it on other repositories, like F-Droid or via an .apk file here |
+1 for upload to external appstore or just rebundle the app with different name+icon. "WidgetFlowy" would be a good name. |
Hey @rmnoon (or anyone that makes it here),
Soraiyu figured out the url to fix the login problem to this widget. I choked through compiling the APK (not a programmer) with those changes and it works ok.
The text was updated successfully, but these errors were encountered: