sixseconds-modules 1.6.41 → 1.6.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +12 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +12 -8
- package/dist/index.es.js.map +1 -1
- package/dist/utils/common.d.ts +8 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -2834,17 +2834,21 @@ const handleRedirection = (type, source) => {
|
|
|
2834
2834
|
}
|
|
2835
2835
|
};
|
|
2836
2836
|
const CookiesUtil = {
|
|
2837
|
+
COOKIE_OPTIONS: {
|
|
2838
|
+
path: "/",
|
|
2839
|
+
domain: DEV ? "localhost" : ".6seconds.org",
|
|
2840
|
+
secure: true,
|
|
2841
|
+
sameSite: "None",
|
|
2842
|
+
expires: 7
|
|
2843
|
+
},
|
|
2837
2844
|
get: (name) => {
|
|
2838
2845
|
return JSON.parse(Cookies.get(name) || "{}");
|
|
2839
2846
|
},
|
|
2840
2847
|
set: (name, val) => {
|
|
2841
|
-
Cookies.set(name, JSON.stringify(val),
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
sameSite: "None",
|
|
2846
|
-
expires: 7
|
|
2847
|
-
});
|
|
2848
|
+
Cookies.set(name, JSON.stringify(val), CookiesUtil.COOKIE_OPTIONS);
|
|
2849
|
+
},
|
|
2850
|
+
remove: (name) => {
|
|
2851
|
+
Cookies.remove(name, CookiesUtil.COOKIE_OPTIONS);
|
|
2848
2852
|
}
|
|
2849
2853
|
};
|
|
2850
2854
|
//! moment.js
|
|
@@ -10776,6 +10780,7 @@ const PreviousLoginBanner = ({ t: t2, router }) => {
|
|
|
10776
10780
|
try {
|
|
10777
10781
|
const res = await autoLoginApi(previousLoginDetails?.id);
|
|
10778
10782
|
if (res.remote === "success") {
|
|
10783
|
+
CookiesUtil.remove("previousLoginDetails");
|
|
10779
10784
|
if (router) {
|
|
10780
10785
|
router.reload();
|
|
10781
10786
|
router.replace(ROUTES.home);
|
|
@@ -10783,7 +10788,6 @@ const PreviousLoginBanner = ({ t: t2, router }) => {
|
|
|
10783
10788
|
window.location.reload();
|
|
10784
10789
|
window.location.href = ROUTES.home;
|
|
10785
10790
|
}
|
|
10786
|
-
Cookies.remove("previousLoginDetails");
|
|
10787
10791
|
}
|
|
10788
10792
|
} catch (err) {
|
|
10789
10793
|
toast.error(t2(ALERT_MESSAGES.fallbackError));
|