mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-22 00:06:06 +08:00
fix(onboarding): Don't store type-specific fields when switching account types
Summary: Since we pass all of the account info to the type-specific auth routes, having extra fields in the account info object can cause the auth request to fail its validation. This diff ensures that switching account types will drop any fields in the account info object that aren't accepted across all routes. Fixes T7455 Test Plan: tested locally Reviewers: evan, juan Reviewed By: juan Maniphest Tasks: T7455 Differential Revision: https://phab.nylas.com/D3633
This commit is contained in:
parent
f7691ff175
commit
2f2cf5be4e
|
@ -105,7 +105,9 @@ class OnboardingStore extends NylasStore {
|
||||||
provider: type,
|
provider: type,
|
||||||
});
|
});
|
||||||
|
|
||||||
this._onSetAccountInfo(Object.assign({}, this._accountInfo, {type}));
|
// Don't carry over any type-specific account information
|
||||||
|
const {email, name, password} = this._accountInfo;
|
||||||
|
this._onSetAccountInfo({email, name, password, type});
|
||||||
this._onMoveToPage(nextPage);
|
this._onMoveToPage(nextPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue