如何使用redux-auth-wrapper

时间:2019-05-13 02:33:58

标签: reactjs redux

我正在使用redux-auth-wrapper / history / redirect创建ReactJS Web,以检查登录后的真实性和重定向。 如何将我的应用重定向到应用外部的新完整URL进行登录 目前,redux-auth-wrapper仅与redirectPath一起使用在我的应用程序中(例如:/ login)。 预先感谢!

const checkIfUserAuthenticated = connectedReduxRedirect({
  authenticatedSelector: state => !isEmpty(state.user.user),
  authenticatingSelector: state =>
    state.user.isLoggingIn || state.user.isFetching,
  redirectAction: routerActions.replace,
  wrapperDisplayName: 'UserIsAuthenticated',
  redirectPath: '/login'
})

0 个答案:

没有答案
相关问题