Skip to content

Commit

Permalink
fix: remove cookie by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Bunyawat Naunnak committed Jul 3, 2024
1 parent 51e7c50 commit 42e3f36
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/app/api/auth/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,10 @@ export async function GET(req: NextRequest) {
const cookieStore = cookies();
const oneDay = 24 * 60 * 60 * 1000;

console.log("DEBUG P OAT user : ", users);

// Remove the student_cookie if it exists
const studentCookie = cookieStore.get("student_cookie");
if (studentCookie) {
cookieStore.delete("student_cookie");
cookieStore.delete("student_id");
}

const token: string = await encrypt(users as object);
Expand Down

0 comments on commit 42e3f36

Please sign in to comment.