Comment 0 for bug 1565772

Revision history for this message
Alberto Mardegan (mardy) wrote : Allow plugins to decide which username to set on new accounts

This bug is related to bug 1547647, even though it makes sense in any case.

Currently, the ApOAuthPlugin class in libaccount-plugin gets the username from the SignonIdentity, which in turn gets it from signon-ui, which in the current WebKit1 implementation gets it from the DOM of the login webpage. This is a hack, it's fragile, not trivial to port to the Oxide web engine, and possibly against some providers' guidelines.

We should retrieve the username using some REST API provided by the service, and in order to do so we need to extend libaccounts-plugin with some hooks which subclasses can use to get the username.