How to disable Universal Login in React

I basically have the below code in my React app with auth0-js and would like to check that when there is no session then redirect to another url but not Universal Login. In the other url, I will be authenticating the login and anchor back to the app. I then would need the AuthProvider to connect to auth0 as it already has the token in the request and just has to only renew WebAuth and not require Universal Login page. How may I disable the Universal Login or reconfigure appropriately

    const AuthProvider = ({ children }: AuthProviderProps) => {
        const [state, dispatch] = useReducer(authReducer, {
    	      auth0Context: new WebAuth({
     	          domain: ...,
    			  clientID: ...,
    			  responseType: ...,
    			  scope: ...,
    			  audience: ...,
    			  redirectUri: ...,
    			}),
    			accessToken: "",
    		  });

    	<AuthProvider>
    	<App />
    	</AuthProvider>

    	React.useEffect(() => {
    		authState.auth0Context.checkSession({}, (err, authResult) => {
    		  if (err && err.code === "login_required"){
    			  window.location.replace(goToAnotherUrl);
    			  return false;
    		  }

The problem I face is that I have to create WebAuth object to check if there is any session and if I create the object, the auth0-js is taking me to Universal Login. Even if I add a route and navigate to another url, still the previous javascript runs in the background and in no time taking me once again to universal login.