mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Merge pull request #17 from Portabase/feat/guard-cookie
fix: bad cookie name with https
This commit is contained in:
@@ -41,3 +41,5 @@ public/uploads/*
|
|||||||
private/uploads/*
|
private/uploads/*
|
||||||
|
|
||||||
/.env
|
/.env
|
||||||
|
|
||||||
|
certificates
|
||||||
+2
-2
@@ -26,5 +26,5 @@ keywords:
|
|||||||
- web-ui
|
- web-ui
|
||||||
- agent
|
- agent
|
||||||
license: Apache-2.0
|
license: Apache-2.0
|
||||||
version: 1.1.12
|
version: 1.1.13-rc.1
|
||||||
date-released: "2026-01-11"
|
date-released: "2026-01-16"
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ 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");
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "portabase",
|
"name": "portabase",
|
||||||
"version": "1.1.12",
|
"version": "1.1.13-rc.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev --turbopack -p 8887",
|
"dev": "next dev --turbopack -p 8887",
|
||||||
|
|||||||
Reference in New Issue
Block a user