fix(mfa): generate SVG QR code

Replace the rasterized 180px PNG QR code with a crisp 250px SVG
This commit is contained in:
jubnl
2026-04-05 17:14:36 +02:00
parent 9ee5d21c3a
commit c6148ba4f2
4 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -260,8 +260,8 @@ router.post('/mfa/setup', authenticate, (req: Request, res: Response) => {
const result = setupMfa(authReq.user.id, authReq.user.email);
if (result.error) return res.status(result.status!).json({ error: result.error });
result.qrPromise!
.then((qr_data_url: string) => {
res.json({ secret: result.secret, otpauth_url: result.otpauth_url, qr_data_url });
.then((qr_svg: string) => {
res.json({ secret: result.secret, otpauth_url: result.otpauth_url, qr_svg });
})
.catch((err: unknown) => {
console.error('[MFA] QR code generation error:', err);