From b940b70839c02a4fab46f6209a30d82281f19754 Mon Sep 17 00:00:00 2001 From: PxlLoewe <72106766+PxlLoewe@users.noreply.github.com> Date: Mon, 30 Jun 2025 13:07:41 -0700 Subject: [PATCH] added nextclud oAuth --- .../(auth)/oauth/_components/Authorize.tsx | 25 +++++++++++++------ apps/hub/helper/authServices.ts | 11 ++++++++ 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/apps/hub/app/(auth)/oauth/_components/Authorize.tsx b/apps/hub/app/(auth)/oauth/_components/Authorize.tsx index 4510977e..7c709d71 100644 --- a/apps/hub/app/(auth)/oauth/_components/Authorize.tsx +++ b/apps/hub/app/(auth)/oauth/_components/Authorize.tsx @@ -4,6 +4,8 @@ import { Service } from "../page"; import { generateToken } from "./action"; import { useSession } from "next-auth/react"; import { useErrorBoundary } from "react-error-boundary"; +import { se } from "date-fns/locale"; +import { PERMISSION } from "@repo/db"; export const Authorize = ({ service }: { service: Service }) => { const { showBoundary } = useErrorBoundary(); @@ -12,8 +14,7 @@ export const Authorize = ({ service }: { service: Service }) => { searchParams.get("redirect_uri")?.startsWith(url), ); const { data: session } = useSession(); - if (!session) - redirect("/login?redirect=" + encodeURIComponent(window.location.href)); + if (!session) redirect("/login?redirect=" + encodeURIComponent(window.location.href)); if (!legitimeUrl) return (
Du greifst von einem nicht genehmigtem Server auf diese URL zu
+ Du hast nicht die erforderlichen Berechtigungen, um dich auf diesem Service anzumelden. +
+