As in React + redux to catch Request to the page?

There is a login page through social networking. After login, server redirects to the page /admin. Like the page /admin to get the value from the request?
There's got to lay the user's data
June 14th 19 at 18:21
1 answer
June 14th 19 at 18:23
Solution
with authorization record data in redux, redux the only source of truth do not deviate from this rule
example
maybe not the best example but it works consistently, I have the authorization through the social network arrives the token in the url
<route exact path="/" render="{()" => {
 let token = getParameterByName('accessToken',history.location.search)
 if(token!=undefined&& token!=null){
this.props.getProfileInfo(token)
}
 return (<redirect to="{`/list/${id}`}/">)
}}
 /></redirect></route>
Can you please elaborate?
I have the entry point looks like this:

import React from 'react';
import { render } from 'react-dom';
import { createStore, applyMiddleware } from 'redux';
import { Provider } from 'react-redux';
import { applyRouterMiddleware, Router, Route, hashHistory, IndexRedirect, Redirect } from 'react-router';
import { syncHistoryWithStore, routerMiddleware } from 'react-router-redux';
reducers import from './reducers';

const middleware = routerMiddleware(hashHistory);
const store = createStore(
reducers,
applyMiddleware(middleware)
);

const history = syncHistoryWithStore(hashHistory, store);

function scrollToTop() {
 window.scrollTo(0, 0);
}

const rootRoute = {
 childRoutes: [{
 path: '/',
 component: require('./containers/App'),
 indexRoute: { the onenter: (nextState, 'replace') = > replace('/landing') },
 childRoutes: [
require('./routes/app'),
require('./routes/404'),
require('./routes/500'),
require('./routes/admin'),
require('./routes/confirmEmail'),
require('./routes/forgotPassword'),
require('./routes/lockScreen'),
require('./routes/login'),
require('./routes/signUp'),
require('./routes/fullscreen'),
require('./routes/landing'),
require('./routes/orderPOS'),
{
 path: '*',
 indexRoute: { the onenter: (nextState, 'replace') = > replace('/404') },
}
]
}]
};


render(
 <provider store="{store}">
 <router onupdate="{scrollToTop}" history="{history}" routes="{rootRoute}">
</router></provider>,
document.getElementById('app-container')
);


I need to catch on the page /admin data from the request. No idea how to do it - Rhoda_Wunsch commented on June 14th 19 at 18:26
in the admin component props are your url settings - Sammie_Bart commented on June 14th 19 at 18:29
describe in detail the task
if I understand correctly you have on the page there is a login authorization through social networks and after a successful login you comes in the url token of the user, right ? - xavier.Breitenberg21 commented on June 14th 19 at 18:32
I have a landing page, there is a button "Login with Facebook". After pressed and successful login user redirects to page /admin. Here there can not understand how to get the user name.

Yes, they have the token and the user name - Rhoda_Wunsch commented on June 14th 19 at 18:35
desired parameters are in the url in react router 4 parameters lie in this.props.history.location.search after get record data in redux - xavier.Breitenberg21 commented on June 14th 19 at 18:38

Find more questions by tags ReactRedux