mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-27 07:16:40 +00:00
add login portal and traefik middleware auth for testing redirect login
This commit is contained in:
@@ -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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user