Relative Content

Tag Archive for next.jsreduxreact-reduxredux-toolkitredux-persist

Resetting redux and cookie from nextjs middleware?

I am using NextJs 14.2, the latest (yet still old) version of redux-persist, and my App uses a combo of jwt tokens and redux to manage authorisation. The issue is that I have a check in middleware.ts which examines if a cookie has expired or not, if it has then I delete the cookie, and want to call provider.purge() on the redux store.