mirror of
https://github.com/SrIzan10/next-auth.git
synced 2026-05-01 10:55:20 +00:00
* merge `main`, fix workspace dependencies * chore(dev): use `matcher` in Middleware * fix(middleware): support `cookies` as `Map` * simplify * chore(example): use new Middleware API * chore(example): use `next-auth@latest` * docs(middleware): document new Middleware API * docs(ts): update inline example * fix(ts): make cookies optional * remove non-null assertion
18 lines
446 B
TypeScript
18 lines
446 B
TypeScript
import Layout from "../components/layout"
|
|
|
|
export default function Page() {
|
|
return (
|
|
<Layout>
|
|
<h1>This page is protected by Middleware</h1>
|
|
<p>Only admin users can see this page.</p>
|
|
<p>
|
|
To learn more about the NextAuth middleware see
|
|
<a href="https://docs-git-misc-docs-nextauthjs.vercel.app/configuration/nextjs#middleware">
|
|
the docs
|
|
</a>
|
|
.
|
|
</p>
|
|
</Layout>
|
|
)
|
|
}
|