Files
external-app/app/page.tsx
zhangheng f737603b0c chore: initial commit of external-app SSO consumer
Next.js sample application that integrates with the mock SSO service:
redirects to sso-mock for login, receives the one-time sso_code on its
/callback route, and exchanges it for user info to establish a session.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 18:11:23 +08:00

19 lines
380 B
TypeScript

import { cookies } from 'next/headers'
import DashboardPage from './DashboardPage'
export default async function Home() {
const cookieStore = await cookies()
const userCookie = cookieStore.get('user')?.value
let user = null
if (userCookie) {
try {
user = JSON.parse(userCookie)
} catch {
// ignore
}
}
return <DashboardPage user={user} />
}