mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-30 03:32:26 +08:00
Fixed login errors
This commit is contained in:
parent
e232c6634e
commit
37b4bf6b58
@ -3,7 +3,6 @@
|
|||||||
import {Totp} from 'time2fa';
|
import {Totp} from 'time2fa';
|
||||||
|
|
||||||
function isTotpEnabled() {
|
function isTotpEnabled() {
|
||||||
console.log("Reading ENV: " + process.env.TOTP_ENABLED );
|
|
||||||
if (process.env.TOTP_ENABLED === undefined) {
|
if (process.env.TOTP_ENABLED === undefined) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -13,10 +13,17 @@
|
|||||||
<h1>Trilium login</h1>
|
<h1>Trilium login</h1>
|
||||||
|
|
||||||
<% if (failedAuth) { %>
|
<% if (failedAuth) { %>
|
||||||
<div class="alert alert-warning">
|
<% if( totpEnabled ) { %>
|
||||||
Password is incorrect. Please try again.
|
<div class="alert alert-warning">
|
||||||
</div>
|
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">
|
<form action="login" method="POST">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user