diff --git a/.github/workflows/dockerToHub-dev.yml b/.github/workflows/dockerToHub-dev.yml index 378d89911..43f1aa219 100644 --- a/.github/workflows/dockerToHub-dev.yml +++ b/.github/workflows/dockerToHub-dev.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v3 with: ref: 'dev' - clean: true + clean: false github-server-url: 'https://gh.siji.ci' - name: build and deploy to Docker Hub run: | @@ -70,4 +70,4 @@ jobs: docker-compose pull && docker-compose up -d yes | docker image prune rm -rf /www/server/nginx/proxy_cache_dir/* - rm -rf /www/server/nginx/proxy_temp_dir/* \ No newline at end of file + rm -rf /www/server/nginx/proxy_temp_dir/* diff --git a/.github/workflows/dockerToHub.yml b/.github/workflows/dockerToHub.yml index 8dcf632c2..6d90ee977 100644 --- a/.github/workflows/dockerToHub.yml +++ b/.github/workflows/dockerToHub.yml @@ -23,7 +23,7 @@ jobs: - name: Check out the repo uses: actions/checkout@v3 with: - clean: true + clean: false github-server-url: 'https://gh.siji.ci' - name: build and deploy to Docker Hub run: | diff --git a/lib/auth.ts b/lib/auth.ts index 48ebb2e37..642d0ca08 100644 --- a/lib/auth.ts +++ b/lib/auth.ts @@ -70,7 +70,7 @@ export const authOptions: NextAuthOptions = { error: "/login", // Error code passed in query string as ?error= }, adapter: PrismaAdapter(prisma), - session: { strategy: "jwt", maxAge: 7 * 24 * 60 * 60 }, + session: { strategy: "jwt", maxAge: 3 * 24 * 60 * 60 }, cookies: { sessionToken: { name: `${SECURE_COOKIES ? "__Secure-" : ""}next-auth.session-token`, @@ -109,7 +109,7 @@ export const authOptions: NextAuthOptions = { }; export function getSession() { - // console.log('in........',) + console.log('in........',) return getServerSession(authOptions) as Promise<{ user: { id: string; diff --git a/middleware.ts b/middleware.ts index 9a231f903..baf4bbe96 100644 --- a/middleware.ts +++ b/middleware.ts @@ -1,7 +1,7 @@ import { NextResponse } from "next/server"; import type { NextRequest } from "next/server"; import { getToken } from "next-auth/jwt"; -import {DENY_LIST, isName} from "@/lib/auth_list"; +import { DENY_LIST, isName } from "@/lib/auth_list"; export default async function middleware(req: NextRequest) { const url = req.nextUrl; diff --git a/package.json b/package.json index 91762af7d..03b3eaee0 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ "@tailwindcss/forms": "^0.5.7", "@tailwindcss/typography": "^0.5.10", "@tauri-apps/cli": "^1.5.8", + "@types/cookie": "^0.6.0", "@types/node": "^20.11.10", "@types/react": "^18.2.48", "@types/react-dom": "^18.2.7",