Google Login window not closing in production

Google Login works on localhost, but on serverside the popup stays open and when I close it I get an error saying

Error: No matching login attempt found

I can’t find it anymore, but I’m sure it also said something about the token already having been used

similar to this issue

nm, it was because of the cloudflare ssl certificate, switched to let’s encrypt and it works perfectly