-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutes.ts
50 lines (46 loc) · 1.17 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
* An array of routes that are public and do not require authentication.
* @type {string[]}
*/
export const publicRoutes = ['/', '/auth/email-verification'];
/**
* An array of routes that are used for authentication.
* These routes will redirect logged in users to `/settings`.
* @type {string[]}
*/
export const authRoutes = [
'/auth/login',
'/auth/register',
'/auth/error',
'/auth/forgot-password',
'/auth/reset-password',
];
/**
* The prefix for api authentication routes.
* Routes that starts with this prefix are used for API authentication process.
* @type {string}
*/
export const apiAuthPrefix = '/api/auth';
/**
* A map of routes used in the application.
*/
export const Routes = {
landing: '/',
platform: {
dashboard: '/dashboard',
library: '/library',
},
auth: {
login: '/auth/login',
register: '/auth/register',
error: '/auth/error',
forgotPassword: '/auth/forgot-password',
emailVerification: '/auth/email-verification',
resetPassword: '/auth/reset-password',
},
};
/**
* The default redirect path after a successful login.
* @type {string}
*/
export const DEFAULT_LOGIN_REDIRECT = Routes.platform.dashboard;