Merge pull request #212 from quexten/fix/client-credentials

Attempt to fix credentials not being set in gui
This commit is contained in:
Bernd Schoolmann 2024-05-11 03:37:09 +02:00 committed by GitHub
commit 08f419ac36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -52,9 +52,9 @@ class GoldwardenLoginApp(Adw.Application):
server = self.server_row.get_text()
goldwarden.set_url(server)
if client_id != "":
goldwarden.set_client_id(client_id)
print("set client id result", goldwarden.set_client_id(client_id.strip()))
if client_secret != "":
goldwarden.set_client_secret(client_secret)
print("set client secret result", goldwarden.set_client_secret(client_secret.strip()))
goldwarden.login_with_password(email, "")
self.window.close()

View File

@ -81,10 +81,10 @@ def get_environment():
return None
def set_client_id(client_id):
send_authenticated_command(f"config set-client-id \"{client_id}\"")
return send_authenticated_command(f"config set-client-id {client_id}")
def set_client_secret(client_secret):
send_authenticated_command(f"config set-client-secret \"{client_secret}\"")
return send_authenticated_command(f"config set-client-secret {client_secret}")
def login_with_password(email, password):
result = send_authenticated_command(f"vault login --email {email}")