-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroutes.ts
More file actions
39 lines (32 loc) · 996 Bytes
/
routes.ts
File metadata and controls
39 lines (32 loc) · 996 Bytes
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
/**
* Un array cu rutele accesibile public;
* Aceste rute nu necesita autentificare;
* @type {string[]}
*/
export const publicRoutes = ["/", "/auth/new-verification"];
/**
* Un array cu rutele protejate;
* Aceste rute necesita autentificare;
* Aceste rute vor redirectiona loggedin users to /settings;
* Acest rute sunt protejate deoarece daca un user este autentificat acesta va fii redirectionat catre settings, daca nu este acesta va fii redirectionat catre /login & /register;
* @type {string[]}
*/
export const authRoutes = [
"/auth/login",
"/auth/register",
"/auth/error",
"/auth/reset",
"/auth/new-password",
];
/**
* Prefixul pentru API authentication routes;
* Rutele ce incep cu acest prefix sunt folosite cu scopul autentificarii;
* Aceste rute nu sunt protejate
* @type {string}
*/
export const apiAuthPrefix = "/api/auth";
/**
* Rutarea implicita dupa ce un user este logat;
* @type {string}
*/
export const DEFAULT_LOGIN_REDIRECT = "/settings";