Fix login errors in ui
This commit is contained in:
parent
20e71663e3
commit
cf9f3f33dd
|
@ -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:
|
||||
if not "Logged in" in result:
|
||||
return "badpass"
|
||||
else:
|
||||
if "Logged in" in result.stderr:
|
||||
print("ok")
|
||||
return "ok"
|
||||
return "error"
|
||||
print("ok")
|
||||
return "ok"
|
||||
|
||||
def login_passwordless(email):
|
||||
|
|
Loading…
Reference in New Issue