Desktop oAuth integration

Co-authored-by: RagingLightning <RagingLightningCode@gmail.com>
This commit is contained in:
PxlLoewe
2025-05-09 08:36:01 -07:00
parent 1948d34963
commit 654bdfbbaa
8 changed files with 95 additions and 62 deletions

View File

@@ -5,7 +5,7 @@ import { getMoodleUserById } from "../../../helper/moodle";
import { inscribeToMoodleCourse } from "../../(app)/events/actions";
export const GET = async (req: NextRequest) => {
// This route is only used by Moodle, so NextAuth is not used here
// This route is only used by Moodle and DEsktop-client, so NextAuth is not used here
const authHeader = req.headers.get("Authorization");
const token = authHeader?.split(" ")[1];
if (!authHeader || !token) {