feat(auth): harden session management and security

- Implement server-side session revocation on logout
- Add IP extraction utility and admin setup error handling
- Improve error codes and response consistency for auth endpoints
- Refine landing page redirect logic to handle transient DB outages
- Update deployment documentation and configuration defaults
This commit is contained in:
Team Dark Devil committed 2026-11-19 20:22:01 +06:00
1 parent 935f12a1e9
commit 89e4d68690
81 files changed
+11530 -6916

No files matched your search

+14 -2
View File
@@ -9,8 +9,20 @@ import { redirect } from 'next/navigation';
export const dynamic = 'force-dynamic';
export default async function LandingPage() {
const isConfigured = await isAdminSetupComplete().catch(() => false);
if (!isConfigured) redirect('/vcon/setup');
try {
const isConfigured = await isAdminSetupComplete();
if (!isConfigured) redirect('/vcon/setup');
} catch (error) {
if (
error &&
typeof error === 'object' &&
'digest' in error &&
String((error as { digest?: unknown }).digest).startsWith('NEXT_REDIRECT')
) {
throw error;
}
// Keep public landing accessible on transient DB outage instead of redirecting to setup
}
return (
<MainLayout>