useUser() not working after deploying

I am having problems when I deploy my Next.js app to cloudflare pages. On my home page I use

import { useUser } from "@auth0/nextjs-auth0";"
and
const { user, error, isLoading } = useUser();

to check if the user is an admin or even logged in. Everything works wonderfully on localhost but when I deploy this only ever returns error with an error message of ,

Error
    at new r (_app-65503a7c31605473.js:1:1682)
    at _app-65503a7c31605473.js:1:2411
    at _app-65503a7c31605473.js:1:8940
    at Object.next (_app-65503a7c31605473.js:1:9045)
    at u (_app-65503a7c31605473.js:1:7783)

I added the live public domain name to the allowed callback and logout urls in application settings and made sure to remove any hidden characters or stuff like that. Also changed the BASE_URL in the enviroment variables section on cloudflare pages and in my .env.local (even tho .env.local is not deployed with the rest of the files althought i tried this with deploying the file).

Not sure what is happening or what to do anymore, any suggestions would help thanks, will provide more information if needed.