diff --git a/packages/google-auth/google/oauth2/webauthn_handler.py b/packages/google-auth/google/oauth2/webauthn_handler.py index d46832dfd633..3ee4a7ebbde3 100644 --- a/packages/google-auth/google/oauth2/webauthn_handler.py +++ b/packages/google-auth/google/oauth2/webauthn_handler.py @@ -57,9 +57,24 @@ def _call_plugin(self, cmd: str, input_json: str) -> str: request = length_bytes_le + input_json.encode() # Call plugin - process_result = subprocess.run( - [cmd], input=request, capture_output=True, check=True - ) + process_result = subprocess.run([cmd], input=request, capture_output=True) + + if process_result.returncode != 0: + stdout_bytes = process_result.stdout + if ( + len(stdout_bytes) >= 4 + and struct.unpack("