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]);