feat(backend): remove 2fa requirement for security keys

This commit is contained in:
TrojanerHD 2024-02-24 02:13:03 +01:00 committed by naskya
parent 846e69fe7b
commit 7ceaa9c090
Signed by: naskya
GPG key ID: 712D413B3A9FED5C
2 changed files with 0 additions and 8 deletions

View file

@ -47,10 +47,6 @@ export default define(meta, paramDef, async (ps, user) => {
throw new Error("incorrect password");
}
if (!profile.twoFactorEnabled) {
throw new Error("2fa not enabled");
}
const clientData = JSON.parse(ps.clientDataJSON);
if (clientData.type !== "webauthn.create") {

View file

@ -32,10 +32,6 @@ export default define(meta, paramDef, async (ps, user) => {
throw new Error("incorrect password");
}
// if (!profile.twoFactorEnabled) {
// throw new Error("2fa not enabled");
// }
// 32 byte challenge
const entropy = await randomBytes(32);
const challenge = entropy