-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathroutes.ts
44 lines (38 loc) · 1.21 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
/*
an array of public routes that do not require authentication
to access. This is used in the auth.tsx file to redirect
users to the login page if they are not authenticated and
try to access a private route.
@type {string[]}
*/
export const publicRoutes = [
"/"
]
/*
the default redirect path after a user logs in. This is
used in the social.tsx file to redirect users to the dashboard
page after they log in using a social provider.
@type {string}
*/
export const DEFAULT_LOGIN_REDIRECT = "/"
export const DEFAULT_LOGOUT_REDIRECT = "/"
export const DEFAULT_REGISTER_REDIRECT = "/dashboard"
export const DEFAULT_FORGOT_PASSWORD_REDIRECT = "/forgot-password"
export const DEFAULT_RESET_PASSWORD_REDIRECT = "/reset-password"
/**
* The prefix for API authentication routes. Thsese Routes starts
* with this prefix are used for API authentication purposes
* @type {string}
*/
export const API_AUTH_PREFIX: string = "/api/auth"
/**
* An array of routes that are used for authentication
* these routes will redirect logged in userd to /dashboard
* @type {string[]}
*/
export const authRoutes: string[] = [
"/sign-in",
"/sign-up",
"/forgot-password",
"/reset-password"
]