Bug 1455292 - Avoid verification for verified Firefox Accounts in TPS; r=tcsc
authorDave Hunt <dhunt@mozilla.com>
Thu, 19 Apr 2018 14:25:28 +0100
changeset 468187 a8a951f488d297e7f3d5c7ac846496e4b9868062
parent 468186 c313d03ea48ac4f5996582914da1748620e6fb16
child 468188 8902ee028f5856f7be6f9827b01332763d65fbbf
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcsc
bugs1455292
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1455292 - Avoid verification for verified Firefox Accounts in TPS; r=tcsc MozReview-Commit-ID: 2OFN5wS1IL8
services/sync/tps/extensions/tps/resource/auth/fxaccounts.jsm
--- a/services/sync/tps/extensions/tps/resource/auth/fxaccounts.jsm
+++ b/services/sync/tps/extensions/tps/resource/auth/fxaccounts.jsm
@@ -173,17 +173,19 @@ var Authentication = {
 
     try {
       // Required here since we don't go through the real login page
       await FxAccountsConfig.ensureConfigured();
 
       let client = new FxAccountsClient();
       let credentials = await client.signIn(account.username, account.password, true);
       await fxAccounts.setSignedInUser(credentials);
-      await this._completeVerification(account.username);
+      if (!credentials.verified) {
+        await this._completeVerification(account.username);
+      }
 
       if (Weave.Status.login !== Weave.LOGIN_SUCCEEDED) {
         Logger.logInfo("Logging into Weave.");
         await Weave.Service.login();
       }
       return true;
     } catch (error) {
       throw new Error("signIn() failed with: " + error.message);