mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-01 20:52:27 +08:00
fix: 🐛 fix login error
This commit is contained in:
parent
5987dedff8
commit
bde58e5836
@ -22,7 +22,7 @@ function checkOpenIDConfig() {
|
||||
}
|
||||
|
||||
function isOpenIDEnabled() {
|
||||
return checkOpenIDConfig().length > 0 ? false : true;
|
||||
return !(checkOpenIDConfig().length > 0) && options.getOption('mfaMethod') === 'oauth';
|
||||
}
|
||||
|
||||
function isUserSaved() {
|
||||
|
@ -3,7 +3,9 @@ import options from './options.js';
|
||||
import totpEncryptionService from './encryption/totp_encryption.js';
|
||||
|
||||
function isTotpEnabled(): boolean {
|
||||
return options.getOption('mfaEnabled') === "true" && options.getOption('mfaMethod') === "totp";
|
||||
return options.getOption('mfaEnabled') === "true" &&
|
||||
options.getOption('mfaMethod') === "totp" &&
|
||||
totpEncryptionService.isTotpSecretSet();
|
||||
}
|
||||
|
||||
function createSecret(): { success: boolean; message?: string } {
|
||||
|
Loading…
x
Reference in New Issue
Block a user