Add authentik

This commit is contained in:
2025-01-15 16:41:21 -06:00
parent fe3dabe3b7
commit 76c1c40e74
8 changed files with 88 additions and 5 deletions

View File

@ -1,10 +1,10 @@
import { signIn } from "next-auth/react";
import { Button } from "~/components/ui/shadcn/button";
export default function Sign_In() {
export default function Sign_In_Authentik() {
return (
<Button
onClick={() => signIn()}
onClick={() => signIn('authentik')}
className="bg-gradient-to-tl from-[#35363F] to=[#24191A] rounded-xl
px-4 py-2 md:py-2.5 font-semibold text-white hover:bg-gradient-to-tr
hover:from-[#35363F] hover:to-[#23242F]"

View File

@ -0,0 +1,15 @@
import { signIn } from "next-auth/react";
import { Button } from "~/components/ui/shadcn/button";
export default function Sign_In_Microsoft() {
return (
<Button
onClick={() => signIn('microsoft-entra-id')}
className="bg-gradient-to-tl from-[#35363F] to=[#24191A] rounded-xl
px-4 py-2 md:py-2.5 font-semibold text-white hover:bg-gradient-to-tr
hover:from-[#35363F] hover:to-[#23242F]"
>
<h1 className="md:text-2xl my-auto font-semibold">Sign In</h1>
</Button>
);
};

View File

@ -0,0 +1,21 @@
import Image from "next/image";
import { signIn } from "~/auth";
export default async function Sign_In_Authentik() {
return (
<form className="items-center justify-center mx-auto"
action={async () => {
"use server";
await signIn("authentik");
}}>
<button type="submit" className="flex flex-row mx-auto
bg-gradient-to-tl from-[#35363F] to=[#24191A] rounded-xl px-4 py-2 md:py-2.5
font-semibold text-white hover:bg-gradient-to-tr hover:from-[#35363F] hover:to-[#23242F]">
<Image src="/images/microsoft_logo.png" alt="Microsoft" width={35} height={35}
className="mr-2"
/>
<h1 className="md:text-2xl my-auto font-semibold">Sign In with Authentik</h1>
</button>
</form>
);
}

View File

@ -1,7 +1,7 @@
import Image from "next/image";
import { signIn } from "~/auth";
export default async function Sign_In() {
export default async function Sign_In_Microsoft() {
return (
<form className="items-center justify-center mx-auto"
action={async () => {

View File

@ -1,6 +1,7 @@
import Link from "next/link";
import Image from "next/image";
import Sign_In from "~/components/auth/server/Sign_In";
import Sign_In_Microsoft from "~/components/auth/server/microsoft/Sign_In";
import Sign_In_Authentik from "~/components/auth/server/authentik/Sign_In";
import Header from "~/components/ui/Header";
export default function No_Session() {
@ -12,7 +13,10 @@ export default function No_Session() {
</div>
<div className="mx-auto flex flex-col">
<div className="py-4">
< Sign_In />
< Sign_In_Microsoft />
</div>
<div className="py-4">
< Sign_In_Authentik />
</div>
<Link href="https://git.gibbyb.com/gib/Tech_Tracker_Web"
className="text-center text-[16px] md:text-lg px-4 py-2 md:py-2.5 font-semibold