0d30aab5 months ago21 lines · 684 B| 1 | import { getAuth } from "@struxa/auth"; |
| 2 | import { createAuthMiddleware, type |
| 3 | |
| 4 | import { useLogger } |
| 5 | |
| 6 | let _middleware: ReturnType |
| 7 | |
| 8 | async function getMiddleware() |
| 9 | if (_middleware) return |
| 10 | const auth = |
| 11 | _middleware = createAuthMiddleware( |
| 12 | exclude: ["/api/auth/**"], |
| 13 | maskEmail: true, |
| 14 | }); |
| 15 | return _middleware; |
| 16 | } |
| 17 | |
| 18 | export async function identifyEvlogUser |
| 19 | const identifyUser = |
| 20 | await identifyUser(useLogger |
| 21 | } |