Error Error: No request state found.

Running on latest versions of Tanstack Start and Better Auth (SSO plugin). This occurs only in production after building when clicking on sign in with microsoft button

ERROR [Better Auth]: Error Error: No request state found. Please make sure you are calling this function within a runWithRequestState callback.

const handleMicrosoftLogin = async () => {
    await authClient.signIn.sso({
      providerId: "microsoft",
      callbackURL: decodeURIComponent(search["redirect_to"] ?? "") || "/",
    });
  };


Any idea? @Better Auth
Was this page helpful?