Skip to content
Snippets Groups Projects
Commit c3ce0d9d authored by Daniel Kovacs's avatar Daniel Kovacs
Browse files

asd

parent 0b5630d2
No related branches found
No related tags found
No related merge requests found
...@@ -70,7 +70,8 @@ app.get('/callback', function (req, res) { ...@@ -70,7 +70,8 @@ app.get('/callback', function (req, res) {
console.log(access_token); console.log(access_token);
let uri = process.env.FRONTEND_URI || 'http://localhost:3000/' let uri = process.env.FRONTEND_URI || 'http://localhost:3000/'
uri= uri + '?access_token=' + access_token uri= uri + '?access_token=' + access_token
if (!!req.query.state){ console.log(req.query.state);
if (typeof req.query.state!=="undefined"){
uri=uri+`&from=${req.query.state}` uri=uri+`&from=${req.query.state}`
} }
res.redirect(uri + '?access_token=' + access_token) res.redirect(uri + '?access_token=' + access_token)
......
...@@ -7,7 +7,6 @@ class Landing extends Component{ ...@@ -7,7 +7,6 @@ class Landing extends Component{
componentDidMount(){ componentDidMount(){
if(this.props.auth.isAuthenticated){ if(this.props.auth.isAuthenticated){
console.log(this.props);
this.props.history.push(`/`); this.props.history.push(`/`);
} else { } else {
const {access_token} = queryString.parse(window.location.search); const {access_token} = queryString.parse(window.location.search);
...@@ -16,9 +15,11 @@ class Landing extends Component{ ...@@ -16,9 +15,11 @@ class Landing extends Component{
} }
componentWillReceiveProps(nextProps){ componentWillReceiveProps(nextProps){
if(nextProps.auth.isAuthenticated){ console.log(this.props)
this.props.history.push('/dashboard'); console.log(nextProps)
} // if(nextProps.auth.isAuthenticated){
// this.props.history.push('/dashboard');
// }
} }
render(){ render(){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment