init: Initial commit

This commit is contained in:
Björn Benouarets
2026-01-19 08:42:07 +01:00
parent 1a47930d75
commit 74232ad2d2
74 changed files with 9822 additions and 98 deletions

27
app/authorize/page.tsx Normal file
View File

@@ -0,0 +1,27 @@
import * as React from "react";
import { redirect } from "next/navigation";
import { cookies } from "next/headers";
import { AuthorizeContainer } from "@/components/core/authorize";
export default async function AuthorizePage({ searchParams }: { searchParams: Promise<{ [key: string]: string | string[] | undefined }> }) {
const params = await searchParams;
const cookieStore = await cookies();
const token = cookieStore.get("token");
if (!token) {
redirect("/");
}
const client_id = params.client_id as string;
const redirect_uri = params.redirect_uri as string;
const response_type = params.response_type as string || "code";
const scope = params.scope as string || "profile email";
return (
<div className="flex justify-center items-center h-screen">
<AuthorizeContainer applicationName="SecNex" applicationUrl="https://secnex.io" client_id={client_id} redirect_uri={redirect_uri} response_type={response_type} scope={scope} />
</div>
)
}