From 0e833d72c759f43dba954e61b80070851f8dff98 Mon Sep 17 00:00:00 2001 From: Nathan Kellenicki Date: Thu, 19 Feb 2026 21:58:45 +0000 Subject: [PATCH] fix: login extract decice metadata --- src/api/hive_auth_async.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/api/hive_auth_async.py b/src/api/hive_auth_async.py index a1e03b8..8dee567 100644 --- a/src/api/hive_auth_async.py +++ b/src/api/hive_auth_async.py @@ -400,6 +400,18 @@ async def login(self): if err.__class__.__name__ == "EndpointConnectionError": raise HiveApiError from err + if ( + "AuthenticationResult" in result + and "NewDeviceMetadata" in result["AuthenticationResult"] + ): + self.access_token = result["AuthenticationResult"]["AccessToken"] + self.device_group_key = result["AuthenticationResult"][ + "NewDeviceMetadata" + ]["DeviceGroupKey"] + self.device_key = result["AuthenticationResult"][ + "NewDeviceMetadata" + ]["DeviceKey"] + return result challenge_name = response["ChallengeName"] raise NotImplementedError(f"The {challenge_name} challenge is not supported")