-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutes.ts
32 lines (29 loc) · 979 Bytes
/
routes.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* Auth Routes
* ------------
* Routes intended for unauthenticated users, like login or register.
* Authenticated users accessing these routes will be redirected.
*/
export const authRoutes: string[] = ['/auth/login', '/auth/register']
/**
* Private Route Prefixes
* -----------------------
* Any route starting with these prefixes is considered private.
* Example: Dashboard, Admin Panel.
*/
export const privateRoutePrefixes: string[] = ['/dashboard']
/**
* API Authentication Prefix
* --------------------------
* Prefix for API routes related to authentication.
*/
export const apiAuthPrefix: string = '/api/auth'
/**
* Redirection Routes
* -------------------
* Configure where users are redirected based on their authentication status.
*/
export const redirectRoutes = {
authenticated: '/dashboard', // Redirect for authenticated users accessing authRoutes
login: '/auth/login', // Redirect for unauthenticated users accessing private routes
}