using react-router v2.4.0 and trying to route the callback of Auth0 to the specific function and component as specified by Auth0.
Here is my code for my router. There is nothing happening, and it seems that props or {location} is not supported. The only way I succeeded in making inline render work, is by simply setting a render={myTest()} route. But haven't been able to get and pass props parameters or anything.
Is it because I am using v2.4.0 of react-router ? Not sure I am ready for a v4 migration since it could cost me quite some time right now to do so.
Any idea?
import Auth from './users/authv9/Auth';
import Callback from './users/authv9/Callback';
const auth = new Auth();
const handleAuthentication = ({location}) => {
console.log('handleAuthentication #1');
console.log(location);
if (/access_token|id_token|error/.test(location.hash)) {
console.log('handleAuthentication #2');
auth.handleAuthentication();
}
}
ReactDOM.render((
<Router history={browserHistory}>
<Route path="/" component={App} auth={auth}>
<IndexRoute component={Home} />
<Route path="callback" render={(props) => {
handleAuthentication(props);
<Callback {...props} />
}}/>