diff --git a/backend/src/auth/authTotp.service.ts b/backend/src/auth/authTotp.service.ts index 5ec4dac..9759a37 100644 --- a/backend/src/auth/authTotp.service.ts +++ b/backend/src/auth/authTotp.service.ts @@ -8,6 +8,7 @@ import { User } from "@prisma/client"; import * as argon from "argon2"; import { authenticator, totp } from "otplib"; import * as qrcode from "qrcode-svg"; +import { ConfigService } from "src/config/config.service"; import { PrismaService } from "src/prisma/prisma.service"; import { AuthService } from "./auth.service"; import { AuthSignInTotpDTO } from "./dto/authSignInTotp.dto"; @@ -16,7 +17,8 @@ import { AuthSignInTotpDTO } from "./dto/authSignInTotp.dto"; export class AuthTotpService { constructor( private prisma: PrismaService, - private authService: AuthService + private authService: AuthService, + private config: ConfigService ) {} async signInTotp(dto: AuthSignInTotpDTO) { @@ -95,7 +97,7 @@ export class AuthTotpService { const otpURL = totp.keyuri( user.username || user.email, - "pingvin-share", + this.config.get("general.appName"), secret ); diff --git a/backend/src/file/file.controller.ts b/backend/src/file/file.controller.ts index 9120f19..f51ca44 100644 --- a/backend/src/file/file.controller.ts +++ b/backend/src/file/file.controller.ts @@ -51,7 +51,7 @@ export class FileController { const zip = this.fileService.getZip(shareId); res.set({ "Content-Type": "application/zip", - "Content-Disposition": contentDisposition(`pingvin-share-${shareId}.zip`), + "Content-Disposition": contentDisposition(`${shareId}.zip`), }); return new StreamableFile(zip);