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>
This commit is contained in:
18
app/page.tsx
Normal file
18
app/page.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
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} />
|
||||
}
|
||||
Reference in New Issue
Block a user