Account: Allow OIDC and LDAP users with password to use 2FA #782 #808

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer
2024-07-10 17:24:02 +02:00
parent 8f22e86f84
commit 9969590472
10 changed files with 120 additions and 33 deletions

View File

@@ -261,6 +261,7 @@ export default {
recoveryCodeCopied: false,
password: "",
showPassword: false,
session: this.$session,
minLength: this.$config.get("passwordLength"),
maxLength: 72,
rtl: this.$rtl,
@@ -269,7 +270,7 @@ export default {
},
computed: {
page() {
if (this.model?.AuthProvider !== "default" && this.model?.AuthProvider !== "local" && this.model?.AuthProvider !== "ldap") {
if (!this.session.hasPassword()) {
return "not_available";
} else if (this.model?.AuthMethod === "2fa") {
return "deactivate";