Introduced Secrets Manager
This commit is contained in:
@@ -3,6 +3,7 @@ import bcrypt from "bcrypt";
|
||||
import jwt from "jsonwebtoken";
|
||||
import { generateRandomPassword, hashPassword } from "../../utils/password"
|
||||
import { sendMail } from "../../utils/mailer"
|
||||
import {secrets} from "../../utils/secrets";
|
||||
|
||||
export default async function authRoutes(server: FastifyInstance) {
|
||||
// Registrierung
|
||||
@@ -140,7 +141,7 @@ export default async function authRoutes(server: FastifyInstance) {
|
||||
} else {
|
||||
const token = jwt.sign(
|
||||
{ user_id: user.id, email: user.email, tenant_id: req.tenant ? req.tenant.id : null },
|
||||
process.env.JWT_SECRET!,
|
||||
secrets.JWT_SECRET!,
|
||||
{ expiresIn: "3h" }
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user