Opened 4 years ago
Last modified 3 years ago
#16589 new enhancement
[Web+] Offer Firefox Account sync support
Reported by: | bitigchi | Owned by: | pulkomandy |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | Applications/WebPositive | Version: | R1/beta2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
It would be nice to have direct Firefox Sync support in WebPositive. Gnome Web (Epiphany) offers this, and allow sync of passwords, tabs, bookmarks. etc. It would be a big incentive for WebPositive adoption.
Change History (2)
comment:1 by , 3 years ago
comment:2 by , 3 years ago
I've done a fair amount of research into this, and I have interest in working on it at some point. I have collected some relevant links:
- High level article: https://hacks.mozilla.org/2018/11/firefox-sync-privacy/
- More details of the Firefox Accounts protocol: https://github.com/mozilla/fxa-auth-server/wiki/onepw-protocol
- A Rust library with various components that can handle sync: https://github.com/mozilla/application-services
- How to run your own sync server, which might be useful for testing. I don't know if this will run on Haiku, but it might since it uses Python: https://mozilla-services.readthedocs.io/en/latest/howtos/run-sync-1.5.html.
- You can also run your own Auth server, though they say it is experimental: https://mozilla-services.readthedocs.io/en/latest/howtos/run-fxa.html
- The library in Epiphany that handles this: https://github.com/GNOME/epiphany/tree/master/lib/sync. The README here has some useful details as well. It might be possible to port this to Haiku and then make a nicer C++ wrapper, though I don't know the details of the GTK GObject system.
My next steps on this would be probably to try to get a small Rust program working which tries to use some of the components from the application-services
project above to try to understand some of the details and get something working. Likely I would do this outside of Haiku because I currently don't have a Haiku dev machine, though given we have a modern Rust port it might also be possible to run in Haiku, and I might try that later. I hope to set up a proper Haiku dev machine again soon.
If this was developed as some sort of plugin maybe we could even consider using the Rust code with a C++ wrapper. I don't think we want to add a Rust compiler as a requirement to build Haiku, but maybe it could be an option for haiku-ports. Mozilla already have some FFI code for Android and iOS for this Rust code.
Though I don't think writing a C++ library from scratch for this would be a ton of work. Famous last words maybe, but obviously the Epiphany people did it in C.
Apparently the API for Firefox accounts is https://github.com/mozilla/fxa/blob/main/packages/fxa-auth-server/docs/api.md , but this doesn't mention bookmarks. So more investigation is needed.
The API is REST which shouldn't be so hard, but it takes great care to protect the data reasonably well, so a bit of crypto is needed at least for the authentication/login steps