-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathroutes.ts
40 lines (36 loc) · 890 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
33
34
35
36
37
38
39
40
/**
* These routes are public and don't need authentication
* @type {string[]}
* */
export const publicRoutes = ['/new-verification'];
/**
* These routes are used for authentication,
* redirect logged-in users to /settings
* @type {string[]}
* */
export const authRoutes = [
'/',
'/login',
'/register',
'/loginerror',
'/reset-password',
'/new-password',
'/login/magic-link',
];
/**
* The prefix for API authentication routes
* Routes that start with this prefix are used for api
* authentication purposes
* @type {string}
* */
export const apiAuthPrefix = '/api/auth';
/**
* Default redirect path for logged-in users
* @type {string}
* */
export const DEFAULT_LOGIN_REDIRECT = '/settings';
/**
* Default Allowed Redirects from callbackUrl searchParams
* @type {string}
* */
export const ALLOWED_REDIRECTS = ['/server', '/admin', '/client', '/settings'];