- SEC filings extraction (10-K, 10-Q, 8-K) - Portfolio analytics with real-time prices - Watchlist management - NextAuth.js authentication - OpenClaw AI integration - PostgreSQL database with auto P&L calculations - Elysia.js backend (Bun runtime) - Next.js 14 frontend (TailwindCSS + Recharts) - Production-ready Docker configurations
13 lines
259 B
TypeScript
13 lines
259 B
TypeScript
import { getServerSession } from 'next-auth'
|
|
import { redirect } from 'next/navigation'
|
|
|
|
export async function requireAuth() {
|
|
const session = await getServerSession()
|
|
|
|
if (!session || !session.user) {
|
|
redirect('/auth/signin')
|
|
}
|
|
|
|
return session
|
|
}
|