I am trying to access authorised route(localhost:3000/abc) via non authenticated user. Then it will be redirecting to auth0 login screen successfully. But after I logged in via auth0, first it will redirect to the landing page with a query param(localhost:3000/code=f23set...) and then it goes to the authorised route(localhost:3000/abc) which I need. So how can I prevent from redirecting to the landing page(localhost:3000/code=f23set...)? My attempt is as below.
import { Route } from "react-router-dom";
import { useAuth0, withAuthenticationRequired } from "@auth0/auth0-react";
<Route
component={withAuthenticationRequired(component, {
onRedirecting: () => <span/>
})}
{...props} />