While using getAccessTokenSilenty() i got error i.e login required?

so the problem am facing is when i try to get the token using getAccessTokensilently() am getting this error in console of my browser however when i change the cookie setting to cookie from unvisited site the error dissapear so what can i do to solve this issue. for me i can change the cookie setting of the browser but user from different place i cannot change thier cookie setting ? what other thing i can do to solve this error.

this is the login code

const onFinish: FormProps<FieldType>["onFinish"] = async () => {
    try {
      await loginWithRedirect();
    } catch (err) {
      console.log(err);
    }
  };

here is the part where am collecting accessToken

useEffect(() => {
    async function setTokenToLocalStorage() {
      try {
        const token = await getAccessTokenSilently();
        localStorage.setItem("auth0-t", token);
        setTokenReady(!tokenReady);
      } catch (e) {
        console.log("this is error", e);
      }
    }
    setTokenToLocalStorage();
  }, [isAuthenticated]);