mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-31 20:41:05 +08:00
Add support for updating refresh tokens if they are returned during access token update
This commit is contained in:
parent
09a09d4680
commit
a516c472f2
5 changed files with 7 additions and 4 deletions
|
@ -416,6 +416,10 @@ export default class MailsyncBridge {
|
|||
OnlineStatusStore.onSyncProcessStateReceived(modelJSONs[0]);
|
||||
continue;
|
||||
}
|
||||
if (modelClass === 'ProcessAccountSecretsUpdated' && modelJSONs.length) {
|
||||
KeyManager.extractAndStoreAccountSecrets(new Account(modelJSONs[0]));
|
||||
continue;
|
||||
}
|
||||
|
||||
// dispatch the message to other windows
|
||||
ipcRenderer.send('mailsync-bridge-rebroadcast-to-all', msg);
|
||||
|
|
|
@ -227,7 +227,7 @@ class _AccountStore extends MailspringStore {
|
|||
|
||||
// send the account JSON and cloud token to the KeyManager,
|
||||
// which gives us back a version with no secrets.
|
||||
const cleanAccount = await KeyManager.extractAccountSecrets(account);
|
||||
const cleanAccount = await KeyManager.extractAndStoreAccountSecrets(account);
|
||||
|
||||
this._loadAccounts();
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@ const VERIFIED_LANGS = [
|
|||
'ko',
|
||||
'pl',
|
||||
'ja',
|
||||
'ko',
|
||||
'zh-CN',
|
||||
'zh-TW',
|
||||
'pt',
|
||||
|
|
|
@ -31,7 +31,7 @@ class KeyManager {
|
|||
}
|
||||
}
|
||||
|
||||
async extractAccountSecrets(account: Account) {
|
||||
async extractAndStoreAccountSecrets(account: Account) {
|
||||
try {
|
||||
const keys = await this._getKeyHash();
|
||||
keys[`${account.emailAddress}-imap`] = account.settings.imap_password;
|
||||
|
|
2
mailsync
2
mailsync
|
@ -1 +1 @@
|
|||
Subproject commit c4577574c6f989b639de1aa2a26c993589d63ed0
|
||||
Subproject commit e079b209eb5e23195df59a12ffbac9503320029a
|
Loading…
Reference in a new issue