Bug 1433042 - Fix initial FxA login flow. r?tcsc
MozReview-Commit-ID: kaD6Bx7oRk
--- a/services/fxaccounts/FxAccounts.jsm
+++ b/services/fxaccounts/FxAccounts.jsm
@@ -961,18 +961,18 @@ FxAccountsInternal.prototype = {
if (DERIVED_KEYS_NAMES.every(k => userData[k])) {
return currentState.resolve(userData);
}
if (!currentState.whenKeysReadyDeferred) {
currentState.whenKeysReadyDeferred = PromiseUtils.defer();
if (userData.keyFetchToken) {
this.fetchAndUnwrapKeys(userData.keyFetchToken).then(
(dataWithKeys) => {
- if (DERIVED_KEYS_NAMES.some(k => !userData[k])) {
- const missing = DERIVED_KEYS_NAMES.filter(k => !userData[k]);
+ if (DERIVED_KEYS_NAMES.some(k => !dataWithKeys[k])) {
+ const missing = DERIVED_KEYS_NAMES.filter(k => !dataWithKeys[k]);
currentState.whenKeysReadyDeferred.reject(
new Error(`user data missing: ${missing.join(", ")}`)
);
return;
}
currentState.whenKeysReadyDeferred.resolve(dataWithKeys);
},
(err) => {