260508_10_ENH: 새로고침 시 로그인 풀리는 문제 수정 중
This commit is contained in:
@@ -22,7 +22,7 @@ const parseStoredValue = (value: string): StorageValue => {
|
||||
|
||||
const stringifyStorageValue = (value: StorageValue): string => {
|
||||
const stringifyValue = JSON.stringify(value);
|
||||
return clientEnv.ENV === "prod" ? Security.encryptBase64(stringifyValue) : stringifyValue;
|
||||
return stringifyValue;
|
||||
};
|
||||
|
||||
export const setLocalStorage = (key: string, value: StorageValue): void => {
|
||||
@@ -46,8 +46,7 @@ export const getLocalStorage = (key: string): StorageValue => {
|
||||
try {
|
||||
return JSON.parse(storedValue);
|
||||
} catch (fallbackError) {
|
||||
localStorage.removeItem(key);
|
||||
console.warn("[storage] localStorage parse failed; removed corrupted value", {
|
||||
console.warn("[storage] localStorage parse failed", {
|
||||
key,
|
||||
decryptError,
|
||||
fallbackError,
|
||||
@@ -90,8 +89,7 @@ export const getSessionStorage = (key: string): StorageValue => {
|
||||
try {
|
||||
return JSON.parse(storedValue);
|
||||
} catch (fallbackError) {
|
||||
sessionStorage.removeItem(key);
|
||||
console.warn("[storage] sessionStorage parse failed; removed corrupted value", {
|
||||
console.warn("[storage] sessionStorage parse failed", {
|
||||
key,
|
||||
decryptError,
|
||||
fallbackError,
|
||||
|
||||
Reference in New Issue
Block a user