/api/auth/login Endpoint 구현

This commit is contained in:
static
2024-12-26 16:50:13 +09:00
parent d83dc6b8d2
commit fac8764572
10 changed files with 205 additions and 9 deletions

12
src/lib/server/loadenv.ts Normal file
View File

@@ -0,0 +1,12 @@
import { env } from "$env/dynamic/private";
if (!env.JWT_SECRET) throw new Error("JWT_SECRET is not set");
export default {
databaseUrl: env.DATABASE_URL || "local.db",
jwt: {
secret: env.JWT_SECRET,
accessExp: env.JWT_ACCESS_TOKEN_EXPIRES || "5m",
refreshExp: env.JWT_REFRESH_TOKEN_EXPIRES || "14d",
},
};