Open DanielDe opened 7 years ago
nextcloud
Updated @wiredone! I believe Nextcloud has support for WebDAV, which is a nice general solution for many of these sync backends. Unfortunately, in my recent experiments with WebDAV, a lot of services don't support accessing it from a browser, so it might require that I implement a proxy server of some sort. So it might be a while before I can get around to it.
I had a look at Nextcloud/WebDAV support. The problem I see is that Nextcloud does not yet support PKCE and they've rejected support for OAuth implicit grant. As far as I can tell, this means that auth either requires a separate server backend (to store the OAuth secrets) or would have to be done using basic auth. Other than that I suspect it shouldn't be too hard to incorporate.
Hey @washort, I appreciate the research!
Unfortunately there’s also another issue (or at least there was when I last checked about 3 months ago): none of the WebDAV services I found, including Nextcloud, added the CORS headers necessary to make cross origin requests from a web browser. So even if they support the necessary authentication mechanisms, all requests are rejected by the browser.
A proxy servercould solve this issue by forwarding all requests and also setting the proper CORS header.
Would you be interested in support for remotestorage.js?
Ah that’s pretty neat! Definitely interested, but it looks like it would require a back end component to be useful. I’m not entirely against a back end, but it opens up a whole bunch of concerns that I don’t have now with just a front end app.
What about OneDrive?
Github is definitely a big one for me. It's the reason I never truly adopted orgzly or other alternatives.
FWIW pcloud has webdav at https://webdav.pcloud.com I just tested browser support on my phone and was able to log in.
Would it be possible to support a manually synced directory? I like to sync my files using syncthing or rsync/cron, both of which simply dump all files in a directory. Could org-web read a simple directory?
@bastibe org-web currently only supports Dropbox and Google Drive. But in the future that's certainly feasible if some API exists to access that folder, like WebDAV or a git remote.
@DanielDe maybe I don't understand this quite right: I was under the impression that I could host org-web on my own server, and simply point it to an externally-synced directory. Is that possible, or could that be made possible?
@bastibe no, not quite. You can host org-web on your own server, but that simply means hosting the static HTML, CSS, and JS files, since org-web runs completely client side (there's no backend/server component). But to actually read an org file org-web requires a sync backend, two of which are currently supported: Dropbox and Google Drive.
@DanielDe I see. That is actually amazing technology! Thank you for clearing this up.
If we're voting on which of the checkboxes, I'm on pCloud as well and should be fine with WebDav support. Haven't worked with WebDav, but with some pointers might be able to help. (PS. Would love to see TypeScript used :)
I'm using Fastmail and would like to use WebDAV also.
I had a look at Nextcloud/WebDAV support. The problem I see is that Nextcloud does not yet support PKCE and they've rejected support for OAuth implicit grant. As far as I can tell, this means that auth either requires a separate server backend (to store the OAuth secrets) or would have to be done using basic auth. Other than that I suspect it shouldn't be too hard to incorporate.
Fastmail doesn't support OAuth at all: they use app passwords instead.
Perhaps it might be worth building a proxy that can take basic auth and provide OAuth with PKCE enabled?
These NPM packages look promising:
This would still of course require org-web to support WebDAV
Perhaps it might be worth building a proxy that can take basic auth and provide OAuth with PKCE enabled?
Yeah, I think this is a great idea and could solve other problems as well, like the problem with many WebDAV services not sending the CORS headers required to make requests from the browser. Unfortunately, even a simple proxy like this ups the complexity required to run org-web pretty substantially, since org-web is currently a pure front-end app.
Any interest in building this @johnhamelink? I'd be happy to provide some support.
Suggestions: