Skip to content

Commit

Permalink
Merge pull request #70 from kamini08/main
Browse files Browse the repository at this point in the history
Remove reCAPTCHA from sih registration page
  • Loading branch information
SkySingh04 authored Sep 22, 2024
2 parents 8ff29df + 0a4a80d commit 136f960
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions app/(default)/api/registration/sih/route.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
import { db } from "@/Firebase";
import {
createCSRFToken,
getSessionIdFromRequest,
verifyCSRFToken,
} from "@/lib/server/csrf";
import { sihValidate } from "@/lib/server/utils";
import { addDoc, collection, getDocs, query, where } from "firebase/firestore";
import { NextResponse } from "next/server";
Expand Down Expand Up @@ -73,20 +68,6 @@ export async function POST(request: Request) {
}
);
}

const sessionId = getSessionIdFromRequest(request);
const csrfToken = createCSRFToken(sessionId);

// Verify the CSRF token
if (!verifyCSRFToken(sessionId, csrfToken)) {
return NextResponse.json(
{ message: "Invalid CSRF token" },
{
status: 403,
}
);
}

// if (!isRecaptchaValid) {
// return NextResponse.json({ message: 'reCAPTCHA verification failed', error: true });
// }
Expand Down

0 comments on commit 136f960

Please sign in to comment.