refactor(auth): standardize session management and security

- Centralize secret retrieval using `getAdminSessionSecret`
- Replace manual session parsing with `verifyRequestAdminSession` utility
- Tighten API validation and improve security headers handling
- Enforce environment variable security for production deployments
This commit is contained in:
Team Dark Devil committed 2026-11-18 05:18:55 +06:00
1 parent 34519c07df
commit 177ed4a844
78 files changed
+6748 -3157

No files matched your search

+3 -3
View File
@@ -12,9 +12,9 @@ export const Footer: React.FC<FooterProps> = ({ isAdmin = false }) => {
<footer className="shrink-0 min-h-9 bg-[var(--bg-activity)] border-t border-[var(--border)] px-4 sm:px-6 py-2 flex flex-wrap items-center justify-between gap-2 text-[11px] text-[var(--text-dim)] select-none">
<span>DataStack</span>
<nav aria-label="Footer navigation" className="flex items-center gap-5">
<Link href="#features" className="hover:text-[var(--text-muted)]">Features</Link>
<Link href="#sdk" className="hover:text-[var(--text-muted)]">SDK</Link>
<Link href="#about" className="hover:text-[var(--text-muted)]">About</Link>
<Link href="/#features" className="hover:text-[var(--text-muted)]">Features</Link>
<Link href="/#sdk" className="hover:text-[var(--text-muted)]">SDK</Link>
<Link href="/#about" className="hover:text-[var(--text-muted)]">About</Link>
</nav>
</footer>
);
+12 -8
View File
@@ -1,6 +1,7 @@
'use client';
import { Button } from '@/components/ui/Button';
import { PWAInstallButton } from '@/components/pwa/PwaLifecycle';
import { Button, buttonClassNames } from '@/components/ui/Button';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
import React, { useEffect, useState } from 'react';
@@ -95,12 +96,14 @@ export const Navbar: React.FC<NavbarProps> = ({
</div>
<nav className="hidden sm:flex items-center gap-5 text-[12px]">
<Link href="#features" className="text-[var(--text-muted)] hover:text-[var(--text)] whitespace-nowrap shrink-0">Features</Link>
<Link href="#sdk" className="text-[var(--text-muted)] hover:text-[var(--text)] whitespace-nowrap shrink-0">SDK</Link>
<Link href="#about" className="text-[var(--text-muted)] hover:text-[var(--text)] whitespace-nowrap shrink-0">About</Link>
<Link href="/#features" className="text-[var(--text-muted)] hover:text-[var(--text)] whitespace-nowrap shrink-0">Features</Link>
<Link href="/#sdk" className="text-[var(--text-muted)] hover:text-[var(--text)] whitespace-nowrap shrink-0">SDK</Link>
<Link href="/#about" className="text-[var(--text-muted)] hover:text-[var(--text)] whitespace-nowrap shrink-0">About</Link>
</nav>
<div className="flex items-center gap-2 shrink-0">
<PWAInstallButton />
<Button
type="button"
variant="icon"
@@ -112,10 +115,11 @@ export const Navbar: React.FC<NavbarProps> = ({
className="h-7 w-7 border border-[var(--border)] bg-[var(--bg-elevated)]"
/>
<Link href="/vcon/dashboard">
<Button size="xs" variant="primary">
Console
</Button>
<Link
href="/vcon/dashboard"
className={buttonClassNames({ size: 'xs', variant: 'primary' })}
>
Console
</Link>
</div>
</header>