Issue while using React and Keycloak - Continuous Reload of webpage

I am getting an issue while using React and Keycloak where after I log in through keycloak, it take me to my page then continuously reloads. I have tried other fixes such as setting onLoad to “check-sso”, CheckLoginIframe to false, my url has “/auth” at the end, all my versions line up, I dont have strictmode on. I am using react V18.3.1, keycloak v16.1.1 running on docker, keycloak-js v16.1.1, react-keycloak/web v3.4.0. I have also tried with all the latest versions of keycloak and this also didnt work. Just unsure what to try next