remove custom runtime env

This commit is contained in:
Torben Haack 2024-10-09 13:46:48 +02:00
parent 8c6e92e51d
commit 3e53a12eb4
2 changed files with 1 additions and 3 deletions

View File

@ -1,7 +1,6 @@
import type { UserRole } from "@/server/auth/permissions";
import { db } from "@/server/db";
import { sessions, users } from "@/server/db/schema";
import { env } from "@/utils/env";
import { DrizzleSQLiteAdapter } from "@lucia-auth/adapter-drizzle";
import { Lucia, type RegisteredDatabaseUserAttributes, type Session } from "lucia";
import { cookies } from "next/headers";
@ -13,7 +12,7 @@ export const lucia = new Lucia(adapter, {
sessionCookie: {
expires: false,
attributes: {
secure: env.RUNTIME_ENVIRONMENT === "production",
secure: process.env.NODE_ENV=== "production",
},
},
getUserAttributes: (attributes) => {

View File

@ -4,7 +4,6 @@ import { z } from "zod";
* Environment variables
*/
export const env = {
RUNTIME_ENVIRONMENT: z.enum(["production", "dev"]).parse(process.env.NODE_ENV),
DB_PATH: "db/sqlite.db",
OAUTH: {
CLIENT_ID: z.string().parse(process.env.OAUTH_CLIENT_ID),