diff --git a/gui/src/gui/login.py b/gui/src/gui/login.py index 2104a82..0c986d1 100644 --- a/gui/src/gui/login.py +++ b/gui/src/gui/login.py @@ -47,8 +47,8 @@ class GoldwardenLoginApp(Adw.Application): def on_login(self): email = self.email_row.get_text() - client_id = self.client_id_row.get_text() - client_secret = self.client_secret_row.get_text() + client_id = self.client_id_row.get_text().strip() + client_secret = self.client_secret_row.get_text().strip() server = self.server_row.get_text() try: goldwarden.set_server(server) @@ -61,10 +61,12 @@ class GoldwardenLoginApp(Adw.Application): dialog.add_response("ok", "Dismiss") dialog.present() return + if client_id != "": goldwarden.set_client_id(client_id) if client_secret != "": goldwarden.set_client_secret(client_secret) + try: goldwarden.login_with_password(email, "") except Exception as e: @@ -83,6 +85,7 @@ class GoldwardenLoginApp(Adw.Application): dialog.add_response("ok", "Dismiss") dialog.present() return + self.window.close() if __name__ == "__main__": diff --git a/gui/src/gui/quickaccess.py b/gui/src/gui/quickaccess.py index 100b2c6..4030814 100644 --- a/gui/src/gui/quickaccess.py +++ b/gui/src/gui/quickaccess.py @@ -69,6 +69,9 @@ class GoldwardenQuickAccessApp(Adw.Application): auto_type_combo = state & Gdk.ModifierType.CONTROL_MASK and state & Gdk.ModifierType.SHIFT_MASK copy_combo = state & Gdk.ModifierType.CONTROL_MASK and not state & Gdk.ModifierType.SHIFT_MASK + if not len(self.filtered_logins) > 0: + return + # totp code if keyval == Gdk.KEY_t or keyval == Gdk.KEY_T: if self.filtered_logins[self.selected_index]["totp"] == "": diff --git a/gui/src/services/goldwarden.py b/gui/src/services/goldwarden.py index dcfeeb5..29f6fff 100644 --- a/gui/src/services/goldwarden.py +++ b/gui/src/services/goldwarden.py @@ -83,10 +83,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}")