Skip to content

Scheduling infrastructure for absolutely everyone.

fix: useOAuthClient is not initialized (#17637)

Lauris Skraucis538a39328e4a
diff --git a/packages/platform/atoms/hooks/useOAuthClient.ts b/packages/platform/atoms/hooks/useOAuthClient.ts
index a55c93b2a75..9a181189350 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<boolean>(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]);