diff --git a/src/ui/redux/actions/app.js b/src/ui/redux/actions/app.js index 74e1d56be..003644740 100644 --- a/src/ui/redux/actions/app.js +++ b/src/ui/redux/actions/app.js @@ -37,7 +37,7 @@ import { doAuthenticate, doGetSync } from 'lbryinc'; import { lbrySettings as config, version as appVersion } from 'package.json'; import { push } from 'connected-react-router'; import analytics from 'analytics'; -import { deleteAuthToken, deleteSavedPassword, getSavedPassword } from 'util/saved-passwords'; +import { deleteCookies, deleteSavedPassword, getSavedPassword } from 'util/saved-passwords'; // @if TARGET='app' const { autoUpdater } = remote.require('electron-updater'); @@ -444,7 +444,7 @@ export function doSignIn() { export function doSignOut() { return dispatch => { - deleteAuthToken() + deleteCookies() .then(() => { // @if TARGET='web' window.persistor.purge(); diff --git a/src/ui/util/saved-passwords.js b/src/ui/util/saved-passwords.js index fa7e87b4c..2f1f92cd0 100644 --- a/src/ui/util/saved-passwords.js +++ b/src/ui/util/saved-passwords.js @@ -121,6 +121,14 @@ export const deleteAuthToken = () => { }); }; +export const deleteCookies = () => { + return new Promise<*>(resolve => { + deleteCookie('auth_token'); + deleteCookie('saved-password'); + resolve(); + }); +}; + export const testKeychain = () => { // we should make sure it works on startup };