feat: refactor admin authentication to staff authentication with updated cookie handling
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { createCookie } from 'react-router'
|
||||
|
||||
import { ADMIN_COOKIES, USER_COOKIES } from '~/configs/cookies'
|
||||
import { STAFF_COOKIES, USER_COOKIES } from '~/configs/cookies'
|
||||
|
||||
export const userTokenCookieConfig = createCookie(USER_COOKIES.token, {
|
||||
httpOnly: false,
|
||||
@@ -10,7 +10,7 @@ export const userTokenCookieConfig = createCookie(USER_COOKIES.token, {
|
||||
path: '/',
|
||||
})
|
||||
|
||||
export const adminTokenCookieConfig = createCookie(ADMIN_COOKIES.token, {
|
||||
export const staffTokenCookieConfig = createCookie(STAFF_COOKIES.token, {
|
||||
httpOnly: false,
|
||||
sameSite: 'lax',
|
||||
secure: process.env.NODE_ENV === 'production',
|
||||
|
||||
Reference in New Issue
Block a user