mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
fix: bad cookie name with https
This commit is contained in:
@@ -41,3 +41,5 @@ public/uploads/*
|
||||
private/uploads/*
|
||||
|
||||
/.env
|
||||
|
||||
certificates
|
||||
@@ -8,8 +8,8 @@ import {CardAuth} from "@/features/layout/card-auth";
|
||||
export default async function GuardPage() {
|
||||
|
||||
const cookieStore = await cookies();
|
||||
const token = cookieStore.get("better-auth.two_factor")?.value;
|
||||
|
||||
const token = cookieStore.get("better-auth.two_factor")?.value || cookieStore.get("__Secure-better-auth.two_factor")?.value;
|
||||
|
||||
if (!token) {
|
||||
redirect("/login");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user