Skip to content
Maximilian Mantz edited this page Jan 20, 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' });

Why am I getting errors when using react-router's hash history?

URL hashes are found to be problematic and are prohibited by some OpenID providers (such as Google) for security reasons and they are not supported by this library. Please use browser history wherever possible.