mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-30 14:39:29 +02:00
add login portal and traefik middleware auth for testing redirect login
This commit is contained in:
parent
e731fc52aa
commit
7c8bb45fb0
14 changed files with 285 additions and 130 deletions
|
@ -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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue