change cookies

This commit is contained in:
Alireza Ahmadi
2024-02-27 01:01:44 +01:00
parent 840b7ba1b1
commit e91d8038ad
5 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ let intervalId:any
// Navigation guard to check authentication state
router.beforeEach((to, from, next) => {
// Check the session cookie
const sessionCookie = document.cookie.split(';').find(cookie => cookie.trim().startsWith('session='))
const sessionCookie = document.cookie.split(';').find(cookie => cookie.trim().startsWith('s-ui='))
const isAuthenticated = !!sessionCookie
// If the route requires authentication and the user is not authenticated, redirect to /login