Bug 1455292 - Avoid verification for verified Firefox Accounts in TPS; r?tcsc draft
authorDave Hunt <dhunt@mozilla.com>
Thu, 19 Apr 2018 14:25:28 +0100
changeset 785040 e23da2617aa1a2a88b3d9f6af4cd9b461e3ebef1
parent 784946 8ed49dd81059dfdd876cf62ad5def1cfa56ffbbf
push id107103
push userbmo:dave.hunt@gmail.com
push dateThu, 19 Apr 2018 13:27:06 +0000
reviewerstcsc
bugs1455292
milestone61.0a1
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);