Bug 1356112 - Set identity.fxaccounts.settings.devices.uri when using the FxA well-known configuration. r?tcsc
MozReview-Commit-ID: IJaMuIorXHg
--- 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);