Bug 1356112 - Set identity.fxaccounts.settings.devices.uri when using the FxA well-known configuration. r?tcsc draft
authorEdouard Oger <eoger@fastmail.com>
Thu, 20 Apr 2017 13:57:23 -0400
changeset 566000 8880a0181a3828c832802e8dca6f841308c0cf32
parent 565261 a34919b3d942cfd4f0737d432742b0ffa9929389
child 625173 fbdf49f68532b9895efa480f096c80f2e7108994
push id55060
push userbmo:eoger@fastmail.com
push dateThu, 20 Apr 2017 17:58:36 +0000
reviewerstcsc
bugs1356112
milestone55.0a1
Bug 1356112 - Set identity.fxaccounts.settings.devices.uri when using the FxA well-known configuration. r?tcsc MozReview-Commit-ID: IJaMuIorXHg
services/fxaccounts/FxAccountsConfig.jsm
--- a/services/fxaccounts/FxAccountsConfig.jsm
+++ b/services/fxaccounts/FxAccountsConfig.jsm
@@ -20,16 +20,17 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 
 const CONFIG_PREFS = [
   "identity.fxaccounts.auth.uri",
   "identity.fxaccounts.remote.oauth.uri",
   "identity.fxaccounts.remote.profile.uri",
   "identity.sync.tokenserver.uri",
   "identity.fxaccounts.remote.webchannel.uri",
   "identity.fxaccounts.settings.uri",
+  "identity.fxaccounts.settings.devices.uri",
   "identity.fxaccounts.remote.signup.uri",
   "identity.fxaccounts.remote.signin.uri",
   "identity.fxaccounts.remote.force_auth.uri",
 ];
 
 this.FxAccountsConfig = {
 
   // Returns a promise that resolves with the URI of the remote UI flows.
@@ -148,16 +149,17 @@ this.FxAccountsConfig = {
       Services.prefs.setCharPref("identity.sync.tokenserver.uri", config.sync_tokenserver_base_url + "/1.0/sync/1.5");
       // Update the prefs that are based off of the autoconfig url
 
       let contextParam = encodeURIComponent(
         Services.prefs.getCharPref("identity.fxaccounts.contextParam"));
 
       Services.prefs.setCharPref("identity.fxaccounts.remote.webchannel.uri", rootURL);
       Services.prefs.setCharPref("identity.fxaccounts.settings.uri", rootURL + "/settings?service=sync&context=" + contextParam);
+      Services.prefs.setCharPref("identity.fxaccounts.settings.devices.uri", rootURL + "/settings/clients?service=sync&context=" + contextParam);
       Services.prefs.setCharPref("identity.fxaccounts.remote.signup.uri", rootURL + "/signup?service=sync&context=" + contextParam);
       Services.prefs.setCharPref("identity.fxaccounts.remote.signin.uri", rootURL + "/signin?service=sync&context=" + contextParam);
       Services.prefs.setCharPref("identity.fxaccounts.remote.force_auth.uri", rootURL + "/force_auth?service=sync&context=" + contextParam);
 
       let whitelistValue = Services.prefs.getCharPref("webchannel.allowObject.urlWhitelist");
       if (!whitelistValue.includes(rootURL)) {
         whitelistValue = `${rootURL} ${whitelistValue}`;
         Services.prefs.setCharPref("webchannel.allowObject.urlWhitelist", whitelistValue);