Introduced Secrets Manager
This commit is contained in:
@@ -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" }
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user