Fixed login errors

This commit is contained in:
chesspro13 2024-09-07 11:47:29 -07:00
parent e232c6634e
commit 37b4bf6b58
No known key found for this signature in database
GPG Key ID: 5FEAE94D298066E5
2 changed files with 10 additions and 4 deletions

View File

@ -3,7 +3,6 @@
import {Totp} from 'time2fa';
function isTotpEnabled() {
console.log("Reading ENV: " + process.env.TOTP_ENABLED );
if (process.env.TOTP_ENABLED === undefined) {
return false;
}

View File

@ -13,10 +13,17 @@
<h1>Trilium login</h1>
<% if (failedAuth) { %>
<div class="alert alert-warning">
Password is incorrect. Please try again.
</div>
<% if( totpEnabled ) { %>
<div class="alert alert-warning">
Password or TOTP is incorrect. Please try again.
</div>
<% }else{ %>
<div class="alert alert-warning">
Password is incorrect. Please try again.
</div>
<% } %>
<% } %>
<form action="login" method="POST">
<div class="form-group">