[React] Refreshing page logs out with Google log in

Hello, I am using login on my React app and it always worked locally. I am now hosting it on my own domain using NGROK + Ubuntu Server + CloudFlare, and when I login with Google, it works but if I change page or even refresh on the current page I am no longer logged in. I setup the Clint and secret ID on the google connection settings and followed other instructions. When I test the connection it also shows it as successful. What’s wrong?

Bump, have not solved this sadly.