We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I'm trying to logout when expired token.
axios.interceptors.response.use( response => response, error => { const { config, status } = error.response; const originalRequest = config; const refreshToken = localStorage.getItem(refreshTokenKey); if (status === 401) { return apiRefreshAccessToken(refreshToken) .then(response => { localStorage.setItem(accessTokenKey, response.data.access_token); return axios(originalRequest); }) .catch(err => { configureStore().dispatch(logout()); return err; }); } return Promise.reject(error); }, ); --------------------------------------------------------------------------------- import { connectedRouterRedirect } from 'redux-auth-wrapper/history4/redirect'; import locationHelperBuilder from 'redux-auth-wrapper/history4/locationHelper'; import { UrlPath } from 'commons/constants'; const locationHelper = locationHelperBuilder({}); export const userIsAuthenticated = connectedRouterRedirect({ redirectPath: `${UrlPath}/`, authenticatedSelector: state => state.toJS().login.idToken !== null, wrapperDisplayName: 'UserIsAuthenticated', }); export const userIsNotAuthenticated = connectedRouterRedirect({ redirectPath: (state, ownProps) => locationHelper.getRedirectQueryParam(ownProps) || `${UrlPath}/fleet-dashboard`, allowRedirectBack: false, authenticatedSelector: state => state.toJS().login.idToken === null, wrapperDisplayName: 'UserIsNotAuthenticated', });
when dispatch logout action, idToken null but not redirect login page. Thanks
The text was updated successfully, but these errors were encountered:
hi ~ has the problem been solved ? I have the same problem,can we talk about it?My email is [email protected]
Sorry, something went wrong.
How you are referencing the HoC inside your routing ?
No branches or pull requests
Hi, I'm trying to logout when expired token.
when dispatch logout action, idToken null but not redirect login page.
Thanks
The text was updated successfully, but these errors were encountered: