remove window.ENV from userDetails route page and use the env from ther server using the loader function
eg:
export const loader: LoaderFunction = async () => {
const oAuthLinks = await getOAuthLinks();
return json<LoaderData>({ ENV: oAuthLinks });
};