Remove deprecated migration
This commit is contained in:
parent
2e87c431ea
commit
c4ae797add
2 changed files with 1 additions and 20 deletions
11
ui/index.jsx
11
ui/index.jsx
|
@ -28,12 +28,7 @@ import { formatLbryUrlForWeb, formatInAppUrl } from 'util/url';
|
||||||
import { PersistGate } from 'redux-persist/integration/react';
|
import { PersistGate } from 'redux-persist/integration/react';
|
||||||
import analytics from 'analytics';
|
import analytics from 'analytics';
|
||||||
import { doToast } from 'redux/actions/notifications';
|
import { doToast } from 'redux/actions/notifications';
|
||||||
import {
|
import { getAuthToken, setAuthToken, doAuthTokenRefresh } from 'util/saved-passwords';
|
||||||
getAuthToken,
|
|
||||||
setAuthToken,
|
|
||||||
doDeprecatedPasswordMigrationMarch2020,
|
|
||||||
doAuthTokenRefresh,
|
|
||||||
} from 'util/saved-passwords';
|
|
||||||
import { X_LBRY_AUTH_TOKEN } from 'constants/token';
|
import { X_LBRY_AUTH_TOKEN } from 'constants/token';
|
||||||
import { PROXY_URL, DEFAULT_LANGUAGE, LBRY_API_URL } from 'config';
|
import { PROXY_URL, DEFAULT_LANGUAGE, LBRY_API_URL } from 'config';
|
||||||
|
|
||||||
|
@ -99,10 +94,6 @@ if (process.env.SEARCH_API_URL) {
|
||||||
setSearchApi(process.env.SEARCH_API_URL);
|
setSearchApi(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
|
|
||||||
doDeprecatedPasswordMigrationMarch2020();
|
|
||||||
doAuthTokenRefresh();
|
doAuthTokenRefresh();
|
||||||
|
|
||||||
// We need to override Lbryio for getting/setting the authToken
|
// We need to override Lbryio for getting/setting the authToken
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
const { DOMAIN } = require('../../config.js');
|
const { DOMAIN } = require('../../config.js');
|
||||||
const AUTH_TOKEN = 'auth_token';
|
const AUTH_TOKEN = 'auth_token';
|
||||||
const SAVED_PASSWORD = 'saved_password';
|
const SAVED_PASSWORD = 'saved_password';
|
||||||
const DEPRECATED_SAVED_PASSWORD = 'saved-password';
|
|
||||||
const domain =
|
const domain =
|
||||||
typeof window === 'object' && window.location.hostname.includes('localhost') ? window.location.hostname : DOMAIN;
|
typeof window === 'object' && window.location.hostname.includes('localhost') ? window.location.hostname : DOMAIN;
|
||||||
const isProduction = process.env.NODE_ENV === 'production';
|
const isProduction = process.env.NODE_ENV === 'production';
|
||||||
|
@ -129,14 +128,6 @@ function doAuthTokenRefresh() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function doDeprecatedPasswordMigrationMarch2020() {
|
|
||||||
const savedPassword = getCookie(DEPRECATED_SAVED_PASSWORD);
|
|
||||||
if (savedPassword) {
|
|
||||||
deleteCookie(DEPRECATED_SAVED_PASSWORD);
|
|
||||||
setSavedPassword(savedPassword, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
setCookie,
|
setCookie,
|
||||||
getCookie,
|
getCookie,
|
||||||
|
@ -150,5 +141,4 @@ module.exports = {
|
||||||
deleteAuthToken,
|
deleteAuthToken,
|
||||||
doSignOutCleanup,
|
doSignOutCleanup,
|
||||||
doAuthTokenRefresh,
|
doAuthTokenRefresh,
|
||||||
doDeprecatedPasswordMigrationMarch2020,
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue