From 538a39328e4ac47dcc17f4dac3238408a47f2b7d Mon Sep 17 00:00:00 2001 From: Lauris Skraucis Date: Thu, 14 Nov 2024 16:35:45 +0100 Subject: [PATCH] fix: useOAuthClient is not initialized (#17637) --- packages/platform/atoms/hooks/useOAuthClient.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/platform/atoms/hooks/useOAuthClient.ts b/packages/platform/atoms/hooks/useOAuthClient.ts index a55c93b2a7..9a18118935 100644 --- a/packages/platform/atoms/hooks/useOAuthClient.ts +++ b/packages/platform/atoms/hooks/useOAuthClient.ts @@ -26,11 +26,11 @@ export const useOAuthClient = ({ const prevClientId = usePrevious(clientId); const [isInit, setIsInit] = useState(false); useEffect(() => { - if (apiUrl && http.getUrl() !== apiUrl) { + if (apiUrl) { http.setUrl(apiUrl); setIsInit(true); } - if (refreshUrl && http.getRefreshUrl() !== refreshUrl) { + if (refreshUrl) { http.setRefreshUrl(refreshUrl); } }, [apiUrl, refreshUrl]);