Skip to content

Build your personal knowledge base with Trilium Notes

Fixed login errors

chesspro1337b4bf6b5873
diff --git a/src/services/totp.ts b/src/services/totp.ts
index dddff71ab0..71580fb92f 100644
--- a/src/services/totp.ts
+++ b/src/services/totp.ts
@@ -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;
}
diff --git a/src/views/login.ejs b/src/views/login.ejs
index 4dcb49fc6c..87fccf4f25 100644
--- a/src/views/login.ejs
+++ b/src/views/login.ejs
@@ -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">