mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-23 21:16:44 +08:00
[client-app] Correctly sign out of NylasID
Summary: This fixes T7995. Previously, attempting to log out from your NylasID would just automatically sign you back in with the same NylasID because the webview session was preserved. Now, instead of relaunching the windows, we restart the app to clear the webview session Test Plan: manual Reviewers: halla, evan Reviewed By: evan Maniphest Tasks: T7995 Differential Revision: https://phab.nylas.com/D4224
This commit is contained in:
parent
6ea9ab3fbf
commit
8f5d36746d
1 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
import Rx from 'rx-lite'
|
||||
import NylasStore from 'nylas-store';
|
||||
import {ipcRenderer} from 'electron';
|
||||
import {ipcRenderer, remote} from 'electron';
|
||||
import request from 'request';
|
||||
import url from 'url'
|
||||
|
||||
|
@ -111,7 +111,10 @@ class IdentityStore extends NylasStore {
|
|||
|
||||
_onLogoutNylasIdentity = async () => {
|
||||
await this.saveIdentity(null)
|
||||
ipcRenderer.send('command', 'application:relaunch-to-initial-windows');
|
||||
// We need to relaunch the app to clear the webview session and allow the
|
||||
// and prevent the webview from re signing in with the same NylasID
|
||||
remote.app.relaunch()
|
||||
remote.app.quit()
|
||||
}
|
||||
|
||||
_onEnvChanged = () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue