delete wallet password too when logging out

This commit is contained in:
Sean Yesmunt 2019-10-31 11:27:15 -04:00
parent 16116e7039
commit 850b47c34e
2 changed files with 10 additions and 2 deletions

View file

@ -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();

View file

@ -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
};