feat: integrate NextAuth for authentication, refactor login and registration processes, and enhance middleware for session management

This commit is contained in:
Julien Froidefond
2025-10-16 15:50:37 +02:00
parent 9ecdd72804
commit 7426bfb33c
33 changed files with 417 additions and 729 deletions

View File

@@ -10,7 +10,14 @@ export function withPageTiming(pageName: string, Component: PageComponent) {
// Ensure params is awaited before using it
const params = props.params ? await Promise.resolve(props.params) : {};
await DebugService.logPageRender(pageName + JSON.stringify(params), duration);
// Only log if debug is enabled and user is authenticated
try {
await DebugService.logPageRender(pageName + JSON.stringify(params), duration);
} catch {
// Silently fail if user is not authenticated or debug is disabled
// This prevents errors on public pages like /login
}
return result;
};