What's the purpose of the Ubuntu Online Accounts extension in Firefox?

On my Ubuntu 14.04, there is a Firefox extension "Ubuntu Online Accounts 0.5", installed by the package xul-ext-webaccounts (which is in the default install).

What is the purpose of this extension? What will stop working if I disable it?

There seems to be no documentation in the package, the description page of the extension is basically empty, and the only link points to https://launchpad.net/webaccounts-browser-extension, on which I also cannot find information on its purpose.

Of course I suspect it is related to the Online Accounts dialog in the System Control Center, however Firefox is not listed as an application in that dialog, and when I visit a page such as Twitter with Firefox for which I have an account set up under Online Accounts, nothing happens.


Solution 1:

Ok, so I decided to investigate in the source code. The extension itself consists only of a few lines of Javascript in the file /usr/lib/xul-ext/webaccounts/content/browser.js that only loads the library /usr/lib/x86_64-linux-gnu/webaccounts-browser-extension/libwebaccounts.so and calls it with info about the currently visited page.

The package webaccounts-extension-common that contains this library also has a file /usr/share/glib-2.0/schemas/com.canonical.webcredentials.capture.gschema.xml that contains the gsettings configuration options of this package. There is only a single one, which lists the sites for which the extension was already active once and won't ask again. In my case, it contained twitter.com, which is why I did not notice anything when visiting Twitter. This blacklist can be cleared with the following command:

gsettings reset com.canonical.webcredentials.capture dontask-accounts

The next time I visited Twitter, the Ubuntu Control Center opened with the Online Accounts dialog, so that is the desired effect of this plugin.

However, the source code of the library shows that there should be more. It contains a function webaccounts_store_login that has the purpose of automatically adding the Twitter/etc. account you just used in the browser to the Ubuntu Online Accounts, such that the desktop integration just works immediately after you used the site once in the browser. This is of course a nice integration. However, this does not work for me (no account is added, only the accounts window opens), and there is a two-year old bug report that indicates that this is the same for others as well.