mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-09 08:15:13 +03:00
MFA: allow recovery codes only if two-factor auth is enabled
Fixes #965 Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -106,6 +106,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{if .TOTPConfig.Enabled }}
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<h6 class="m-0 font-weight-bold text-primary">Recovery codes</h6>
|
||||
@@ -142,6 +143,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{define "dialog"}}
|
||||
<div class="modal fade" id="disableTOTPModal" tabindex="-1" role="dialog" aria-labelledby="disableTOTPModalLabel"
|
||||
@@ -416,7 +418,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
$('#errorRecCodesMsg').show();
|
||||
setTimeout(function () {
|
||||
$('#errorRecCodesMsg').hide();
|
||||
}, 5000);
|
||||
}, 8000);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -460,7 +462,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
$('#errorRecCodesMsg').show();
|
||||
setTimeout(function () {
|
||||
$('#errorRecCodesMsg').hide();
|
||||
}, 5000);
|
||||
}, 8000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user