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>
30 lines
874 B
TypeScript
30 lines
874 B
TypeScript
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>
|
|
)
|
|
}
|