Fix login errors in ui

This commit is contained in:
Bernd Schoolmann 2024-02-12 03:20:14 +01:00
parent 20e71663e3
commit cf9f3f33dd
No known key found for this signature in database
1 changed files with 2 additions and 12 deletions

View File

@ -87,18 +87,8 @@ def set_client_secret(client_secret):
def login_with_password(email, password):
result = send_authenticated_command(f"vault login --email {email}")
if result.returncode != 0:
raise Exception("Failed to initialize repository, err", result.stderr)
if len(result.stderr.strip()) > 0:
print(result.stderr)
if "password" in result.stderr:
return "badpass"
else:
if "Logged in" in result.stderr:
print("ok")
return "ok"
return "error"
print("ok")
if not "Logged in" in result:
return "badpass"
return "ok"
def login_passwordless(email):