From 1aa559537a4c920d5400e1778cf5a25b17162e09 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 19 Apr 2023 07:02:33 -0700 Subject: [PATCH] Update proxy.js --- src/widgets/homebridge/proxy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/homebridge/proxy.js b/src/widgets/homebridge/proxy.js index 018aa78f2..b0a75a03d 100644 --- a/src/widgets/homebridge/proxy.js +++ b/src/widgets/homebridge/proxy.js @@ -52,7 +52,7 @@ async function apiCall(widget, endpoint, service) { if (status === 401 || status === 403) { logger.debug("Homebridge API rejected the request, attempting to obtain new session token"); - const { accessToken } = login(widget, service); + const { accessToken } = await login(widget, service); headers.Authorization = `Bearer ${accessToken}`; // retry the request, now with the new session token