Introduced Secrets Manager

This commit is contained in:
2025-09-28 17:43:21 +02:00
parent 4d9b1f1dff
commit 83fc24be0c
13 changed files with 79 additions and 32 deletions

View File

@@ -1,5 +1,6 @@
import { FastifyInstance } from "fastify";
import jwt from "jsonwebtoken";
import {secrets} from "../utils/secrets";
export default async function routes(server: FastifyInstance) {
server.get("/tenant", async (req) => {
@@ -45,7 +46,7 @@ export default async function routes(server: FastifyInstance) {
email: req.user.email,
tenant_id: body.tenant_id,
},
process.env.JWT_SECRET!,
secrets.JWT_SECRET!,
{ expiresIn: "3h" }
);