update name
This commit is contained in:
parent
878ad61fd1
commit
d85a1dc67c
2 changed files with 11 additions and 3 deletions
10
ui/index.jsx
10
ui/index.jsx
|
@ -24,7 +24,12 @@ import { ConnectedRouter, push } from 'connected-react-router';
|
|||
import { formatLbryUrlForWeb, formatInAppUrl } from 'util/url';
|
||||
import { PersistGate } from 'redux-persist/integration/react';
|
||||
import analytics from 'analytics';
|
||||
import { getAuthToken, setAuthToken, doCookieCleanup } from 'util/saved-passwords';
|
||||
import {
|
||||
getAuthToken,
|
||||
setAuthToken,
|
||||
doDeprecatedPasswordMigrationMarch2020,
|
||||
doAuthTokenRefresh,
|
||||
} from 'util/saved-passwords';
|
||||
import { X_LBRY_AUTH_TOKEN } from 'constants/token';
|
||||
|
||||
// Import our app styles
|
||||
|
@ -90,7 +95,8 @@ if (process.env.SEARCH_API_URL) {
|
|||
// Fix to make sure old users' cookies are set to the correct domain
|
||||
// This can be removed after March 11th, 2021
|
||||
// https://github.com/lbryio/lbry-desktop/pull/3830
|
||||
doCookieCleanup();
|
||||
doDeprecatedPasswordMigrationMarch2020();
|
||||
doAuthTokenRefresh();
|
||||
|
||||
// We need to override Lbryio for getting/setting the authToken
|
||||
// We interact with ipcRenderer to get the auth key from a users keyring
|
||||
|
|
|
@ -146,13 +146,15 @@ export const doSignOutCleanup = () => {
|
|||
});
|
||||
};
|
||||
|
||||
export const doCookieCleanup = () => {
|
||||
export const doAuthTokenRefresh = () => {
|
||||
const authToken = getAuthToken();
|
||||
if (authToken) {
|
||||
deleteAuthToken();
|
||||
setAuthToken(authToken);
|
||||
}
|
||||
};
|
||||
|
||||
export const doDeprecatedPasswordMigrationMarch2020 = () => {
|
||||
const savedPassword = getCookie(DEPRECATED_SAVED_PASSWORD);
|
||||
if (savedPassword) {
|
||||
deleteCookie(DEPRECATED_SAVED_PASSWORD);
|
||||
|
|
Loading…
Reference in a new issue