diff --git a/apps/admin/utils/common.ts b/apps/admin/utils/common.ts index 793d7bb..1d99ab3 100644 --- a/apps/admin/utils/common.ts +++ b/apps/admin/utils/common.ts @@ -42,7 +42,6 @@ export function getRedirectUrl() { export function Logout() { if (!isBrowser()) return; - const cookies = new Cookies(null, { path: '/' }); cookies.remove('Authorization'); const pathname = location.pathname; if (!['', '/'].includes(pathname)) { diff --git a/apps/user/utils/common.ts b/apps/user/utils/common.ts index 80e268b..c008d0f 100644 --- a/apps/user/utils/common.ts +++ b/apps/user/utils/common.ts @@ -41,7 +41,7 @@ export function getRedirectUrl() { } export function Logout() { - const cookies = new Cookies(null, { path: '/' }); + if (!isBrowser()) return; cookies.remove('Authorization'); const pathname = location.pathname; if (!['', '/', '/auth', '/tos'].includes(pathname)) {