diff --git a/server/biome.json b/server/biome.json index 574d164..deed4a7 100644 --- a/server/biome.json +++ b/server/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.2.0/schema.json", + "$schema": "https://biomejs.dev/schemas/2.2.3/schema.json", "vcs": { "enabled": false, "clientKind": "git", diff --git a/server/package.json b/server/package.json index b8033b0..bef7cb3 100644 --- a/server/package.json +++ b/server/package.json @@ -17,7 +17,7 @@ "license": "ISC", "packageManager": "pnpm@10.15.0", "devDependencies": { - "@biomejs/biome": "2.2.0", + "@biomejs/biome": "2.2.3", "@tsconfig/strictest": "^2.0.5", "@types/express": "^5.0.3", "@types/express-session": "^1.18.0", diff --git a/server/src/routes/auth.ts b/server/src/routes/auth.ts index 9f746c7..af803ca 100644 --- a/server/src/routes/auth.ts +++ b/server/src/routes/auth.ts @@ -34,7 +34,7 @@ authRouter.get("/login/:forgeType", (req: Request, res: Response) => { sameSite: "lax", }); - res.json({ authUrl: authData.url + `&state=${authData.state}` }); + res.json({ authUrl: `${authData.url}&state=${authData.state}` }); } catch (err) { console.error("Failed to generate auth URL:", err); res.status(400).json({ error: (err as Error).message }); diff --git a/server/src/server.ts b/server/src/server.ts index ea97494..358972f 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -13,22 +13,24 @@ async function startServer() { const app = express(); app.use(express.json()); - const sessionCookieName = config.IS_PRODUCTION ? "__Host-SessionID" : "sessionID"; + const sessionCookieName = config.IS_PRODUCTION + ? "__Host-SessionID" + : "sessionID"; app.use( - session({ - name: sessionCookieName, - secret: config.SESSION_SECRET, - resave: false, - saveUninitialized: false, - cookie: { - secure: config.IS_PRODUCTION, // false in dev - httpOnly: true, - sameSite: "lax", - maxAge: 24 * 60 * 60 * 1000, - path: "/", - }, - }), + session({ + name: sessionCookieName, + secret: config.SESSION_SECRET, + resave: false, + saveUninitialized: false, + cookie: { + secure: config.IS_PRODUCTION, // false in dev + httpOnly: true, + sameSite: "lax", + maxAge: 24 * 60 * 60 * 1000, + path: "/", + }, + }), ); app.use("/auth", authRouter);