Bug 1455292 - Avoid verification for verified Firefox Accounts in TPS; r?tcsc
MozReview-Commit-ID: 2OFN5wS1IL8
--- 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);