-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroute.ts
More file actions
39 lines (36 loc) · 1014 Bytes
/
route.ts
File metadata and controls
39 lines (36 loc) · 1014 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
/**
* Public Routes
*
* Routes accessible without authentication. Any visitor can access these paths.
*
* @type {string[]}
*/
export const publicRoute = ["/", "/auth/new-verification"];
/**
* Authentication Routes
*
* Routes for login and registration flows.
* - Accessible only to unauthenticated users
* - Authenticated users are redirected to DEFAULT_LOGIN_REDIRECT
*
* @type {string[]}
*/
export const authRoute = ["/auth/login", "/auth/register", "/auth/error","/auth/reset","/auth/new-password"];
/**
* API Authentication Prefix
*
* Base path for all NextAuth.js authentication API endpoints.
* Handles signin, signout, callbacks, and session management.
*
* @type {string}
*/
export const apiAuthPrefix = "/api/auth";
/**
* Default Login Redirect Path
*
* Where users are redirected after successful login when no callbackUrl is provided.
* Also used when authenticated users try to access auth routes.
*
* @type {string}
*/
export const DEFAULT_LOGIN_REDIRECT = "/settings";