diff --git a/env.example b/env.example new file mode 100644 index 0000000..b8d65f2 --- /dev/null +++ b/env.example @@ -0,0 +1,16 @@ +# When adding additional environment variables, the schema in "/src/env.js" +# should be updated accordingly. + +# Drizzle +DATABASE_URL="" + +# API Key +API_KEY="" + +# Auth.js +#NEXTAUTH_SECRET="" +AUTH_SECRET="" +# Entra - https://authjs.dev/getting-started/providers/microsoft-entra-id +AUTH_MICROSOFT_ENTRA_ID_ID="" +AUTH_MICROSOFT_ENTRA_ID_SECRET="" +AUTH_MICROSOFT_ENTRA_ID_TENANT_ID="" diff --git a/scripts/reload_container.sh b/scripts/reload_container.sh index e002453..3aa9a64 100755 --- a/scripts/reload_container.sh +++ b/scripts/reload_container.sh @@ -1,7 +1,7 @@ git pull -mv ~/Documents/Web/Tech_Tracker_Web/next.config.js ~/Documents/Web/Tech_Tracker_Web/scripts/next.config.default.js -cp ~/Documents/Web/Tech_Tracker_Web/scripts/next.config.build.js ~/Documents/Web/Tech_Tracker_Web/next.config.js +mv ./next.config.js ./scripts/next.config.default.js +cp ./scripts/next.config.build.js ./next.config.js sudo docker compose -f docker/development/compose.yaml down sudo docker compose -f docker/development/compose.yaml build sudo docker compose -f docker/development/compose.yaml up -d -cp ~/Documents/Web/Tech_Tracker_Web/scripts/next.config.default.js ~/Documents/Web/Tech_Tracker_Web/next.config.js +cp ./scripts/next.config.default.js ./next.config.js diff --git a/src/components/auth/client/Sign_In.tsx b/src/components/auth/client/Sign_In.tsx new file mode 100644 index 0000000..c7624ef --- /dev/null +++ b/src/components/auth/client/Sign_In.tsx @@ -0,0 +1,15 @@ +import { signIn } from "next-auth/react"; +import { Button } from "~/components/ui/shadcn/button"; + +export default function Sign_In() { + return ( + + ); +}; diff --git a/src/components/auth/server/Sign_In.tsx b/src/components/auth/server/Sign_In.tsx new file mode 100644 index 0000000..710a8c0 --- /dev/null +++ b/src/components/auth/server/Sign_In.tsx @@ -0,0 +1,21 @@ +import Image from "next/image"; +import { signIn } from "~/auth"; + +export default async function Sign_In() { + return ( +
{ + "use server"; + await signIn("microsoft-entra-id"); + }}> + +
+ ); +}