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:
zhangheng
2026-07-06 18:11:23 +08:00
commit f737603b0c
14 changed files with 1639 additions and 0 deletions

29
app/layout.tsx Normal file
View File

@@ -0,0 +1,29 @@
import type { Metadata } from 'next'
import { ColorSchemeScript, MantineProvider, mantineHtmlProps } from '@mantine/core'
import { Notifications } from '@mantine/notifications'
import { theme } from './theme'
import './globals.css'
import '@mantine/core/styles.css'
import '@mantine/core/styles.layer.css'
import '@mantine/notifications/styles.css'
export const metadata: Metadata = {
title: '外部应用 Demo',
description: 'SSO 外部应用测试项目',
}
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="zh" {...mantineHtmlProps}>
<head>
<ColorSchemeScript defaultColorScheme="light" />
</head>
<body>
<MantineProvider defaultColorScheme="light" theme={theme}>
<Notifications />
{children}
</MantineProvider>
</body>
</html>
)
}