more fixes

This commit is contained in:
Lokowitz
2025-05-17 20:04:56 +00:00
parent eff812eaa8
commit d9ee40c898
48 changed files with 122 additions and 135 deletions

View File

@@ -3,7 +3,7 @@ import ValidateOidcToken from "./ValidateOidcToken";
import { idp } from "@server/db/schemas";
import db from "@server/db";
import { eq } from "drizzle-orm";
import { useTranslations } from "next-intl";
import { getTranslations } from 'next-intl/server';
export default async function Page(props: {
params: Promise<{ orgId: string; idpId: string }>;
@@ -14,6 +14,7 @@ export default async function Page(props: {
}) {
const params = await props.params;
const searchParams = await props.searchParams;
const t = await getTranslations();
const allCookies = await cookies();
const stateCookie = allCookies.get("p_oidc_state")?.value;
@@ -24,8 +25,6 @@ export default async function Page(props: {
.from(idp)
.where(eq(idp.idpId, parseInt(params.idpId!)));
const t = useTranslations();
if (!idpRes) {
return <div>{t('idpErrorNotFound')}</div>;
}