feat: add login and print user object on my-pages

This commit is contained in:
Arvid Norlin
2024-03-11 17:27:57 +01:00
committed by Simon Emanuelsson
parent f1278a8d11
commit 70f9c22410
19 changed files with 396 additions and 46 deletions

1
routes/api.ts Normal file
View File

@@ -0,0 +1 @@
export const apiAuthPrefix = "/api/auth"

10
routes/protected.ts Normal file
View File

@@ -0,0 +1,10 @@
import { pageNames } from "@/constants/myPages"
import type { Lang } from "@/types/lang"
/* Authenticated routes */
export const protectedRoutes: string[] = [
...Object.keys(pageNames).map(
(locale) => `/${locale}/${pageNames[locale as Lang]}`
),
]

2
routes/public.ts Normal file
View File

@@ -0,0 +1,2 @@
/* Unauthenticated routes */
export const publicRoutes: string[] = ["/"]