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/*
|
private/uploads/*
|
||||||
|
|
||||||
/.env
|
/.env
|
||||||
|
|
||||||
|
certificates
|
||||||
@@ -8,7 +8,7 @@ import {CardAuth} from "@/features/layout/card-auth";
|
|||||||
export default async function GuardPage() {
|
export default async function GuardPage() {
|
||||||
|
|
||||||
const cookieStore = await cookies();
|
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) {
|
if (!token) {
|
||||||
redirect("/login");
|
redirect("/login");
|
||||||
|
|||||||
Reference in New Issue
Block a user