add login portal and traefik middleware auth for testing redirect login

This commit is contained in:
Milo Schwartz 2024-10-06 18:08:26 -04:00
parent e731fc52aa
commit 7c8bb45fb0
14 changed files with 285 additions and 130 deletions

View file

@ -1,3 +1,19 @@
export default function Page() {
return <></>;
import { verifySession } from "@app/lib/verifySession";
import { LandingProvider } from "@app/providers/LandingProvider";
import { redirect } from "next/navigation";
export default async function Page() {
const { user } = await verifySession();
if (!user) {
redirect("/auth/login");
}
return (
<>
<LandingProvider user={user}>
<p>You're logged in!</p>
</LandingProvider>
</>
);
}