diff --git a/google_yubikey/__init__.py b/google_yubikey/__init__.py index f6a2c95..bb7233c 100755 --- a/google_yubikey/__init__.py +++ b/google_yubikey/__init__.py @@ -281,6 +281,9 @@ def get_access_token(id_token: str): 'assertion': id_token, }, ) + if not response.ok: + raise RuntimeError(response.json()['error_description']) + return response.json()['access_token']