Skip to content
Maximilian Mantz edited this page Jan 4, 2017 · 5 revisions

How to pass in the redirectUrl with triggerAuthFlow set to false?

You will have to pass in the current URL to the data passed to the OpenID Provider like this:

userManager.signinRedirect({
  data: {
    redirectUrl: window.location.href
  }
});

When I load my page nothing happens. Why is that?

This package uses a middleware to handle OIDC interactions. In case you aren't using react-router (or any other redux library which dispatches an action on load) you have to jumpstart the middleware by dispatching an action like this:

`store.dispatch({ type: 'INIT_MIDDLEWARE' });'

Clone this wiki locally