- OAuth: RFC 8414/9728 metadata, RFC 7591 dynamic registration, authorization code + PKCE S256 with a consent screen after Gitea login, refresh token rotation; tokens and codes stored hashed; revoke in web - /mcp: stateless Streamable HTTP, Bearer → user; PM tools from @peppa/mcp/manager: projects, goals, tasks, create, move (board semantics, starts agents), inbox, answer/accept — owner-scoped - login keeps ?next= through Gitea OAuth; Settings page with MCP URL and connected apps - 5 new tests (53 e2e total, green); verified on prod as a client: DCR → consent → token → MCP over HTTPS → revoke → 401 - OpenSpec: pep-8 archived into spec remote-mcp Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
937 B
TypeScript
30 lines
937 B
TypeScript
import Link from "next/link";
|
||
import type { ReactNode } from "react";
|
||
import { requireUser } from "@/lib/auth";
|
||
|
||
export const dynamic = "force-dynamic";
|
||
|
||
export default async function AppLayout({ children }: { children: ReactNode }) {
|
||
const user = await requireUser();
|
||
return (
|
||
<>
|
||
<header className="top">
|
||
<Link href="/" className="brand">🐷 Peppa</Link>
|
||
<nav>
|
||
<Link href="/">Входящие</Link>
|
||
<Link href="/projects/new">Новый проект</Link>
|
||
<Link href="/settings">Настройки</Link>
|
||
</nav>
|
||
<div className="me">
|
||
{user.avatarUrl && <img src={user.avatarUrl} alt="" width={24} height={24} />}
|
||
<span>{user.login}</span>
|
||
<form action="/logout" method="post">
|
||
<button className="link">Выйти</button>
|
||
</form>
|
||
</div>
|
||
</header>
|
||
<main>{children}</main>
|
||
</>
|
||
);
|
||
}
|