delete wallet password too when logging out
This commit is contained in:
parent
16116e7039
commit
850b47c34e
2 changed files with 10 additions and 2 deletions
|
@ -37,7 +37,7 @@ import { doAuthenticate, doGetSync } from 'lbryinc';
|
||||||
import { lbrySettings as config, version as appVersion } from 'package.json';
|
import { lbrySettings as config, version as appVersion } from 'package.json';
|
||||||
import { push } from 'connected-react-router';
|
import { push } from 'connected-react-router';
|
||||||
import analytics from 'analytics';
|
import analytics from 'analytics';
|
||||||
import { deleteAuthToken, deleteSavedPassword, getSavedPassword } from 'util/saved-passwords';
|
import { deleteCookies, deleteSavedPassword, getSavedPassword } from 'util/saved-passwords';
|
||||||
|
|
||||||
// @if TARGET='app'
|
// @if TARGET='app'
|
||||||
const { autoUpdater } = remote.require('electron-updater');
|
const { autoUpdater } = remote.require('electron-updater');
|
||||||
|
@ -444,7 +444,7 @@ export function doSignIn() {
|
||||||
|
|
||||||
export function doSignOut() {
|
export function doSignOut() {
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
deleteAuthToken()
|
deleteCookies()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// @if TARGET='web'
|
// @if TARGET='web'
|
||||||
window.persistor.purge();
|
window.persistor.purge();
|
||||||
|
|
|
@ -121,6 +121,14 @@ export const deleteAuthToken = () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const deleteCookies = () => {
|
||||||
|
return new Promise<*>(resolve => {
|
||||||
|
deleteCookie('auth_token');
|
||||||
|
deleteCookie('saved-password');
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
export const testKeychain = () => {
|
export const testKeychain = () => {
|
||||||
// we should make sure it works on startup
|
// we should make sure it works on startup
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue