auth0-samples / auth0-react-sample

130 stars 149 forks source link

Not Able to redirect to home page after login #25

Closed anshul-shukla closed 7 years ago

anshul-shukla commented 8 years ago

I am using - https://auth0.com/docs/quickstart/spa/react/01-login approach for login on my app. Everything is working fine except after login it is not redirecting to home page.

After redirection url i am getting - /login#

Here is my route -

<Router history={browserHistory}>
    <Route path="/" component={App} auth={auth}>
      <IndexRedirect to="/home" />
      <Route path="/login" component={Login}/>
      <Route path="/home" component={AppComponent} onEnter={requireAuth}>
        <Route path="/match" component={Match}/>
        <Route path="/player" component={Player}/>
      </Route>
    </Route>
  </Router>

Any Clue ?

juanpicado commented 8 years ago

The access token is missing in your Router children <Route path="access_token=:token" component={Login} /> I'm facing problems using browserHistory instead the hashHistory. I could not fix it yet.

jeveloper commented 8 years ago

@juanpicado same here with a fairly basic app, browserHistory doesnt seem to work.

Strange that tutorial uses browserhistory, github is different

frankcalise commented 7 years ago

I'm also experiencing this, has anyone come up with a solution? About to contact auth0 support to see if they have any idea.

jeveloper commented 7 years ago

Reverted back to using hashHistory and url path

twgraham commented 7 years ago

Ive been bitten in the past by this issue, however i was kind of rolling my own webpack config using webpack-dev-server over hjs-server. Curious, is anyone doing the same, or are people having issues with browser history with the default repo setup?

chenkie commented 7 years ago

Closing this out as the samples have been deprecated in favor the latest ones :)