improve totp security (#2668)

improve security
This commit is contained in:
Bernd Storath
2026-06-16 14:12:00 +02:00
committed by GitHub
parent 30498520d2
commit 5f54fa3e58
3 changed files with 21 additions and 0 deletions
@@ -221,6 +221,10 @@ export class UserService {
throw new Error('User not found');
}
if (txUser.totpVerified) {
throw new Error('TOTP is already verified');
}
const totpKey = txUser.totpKey;
if (!totpKey) {
throw new Error('TOTP key is not set');