How can middleware.js redirect trigger a full reload?
Unanswered
Japanese cockle posted this in #help-forum
Japanese cockleOP
I have a middleware.js that does some authentication checks and if necessary adds some new refresh/access cookies to the response to keep the session going.
However, when the access token is exchanged in the middleware.js, I would like to force the page to be fully laid out so that my root application that contains context providers can pull the most "recent" information and populate that down.
As it stands right now, redirecting to the same URL doesn't actually cause the full layout to be re-rendered.
However, when the access token is exchanged in the middleware.js, I would like to force the page to be fully laid out so that my root application that contains context providers can pull the most "recent" information and populate that down.
As it stands right now, redirecting to the same URL doesn't actually cause the full layout to be re-rendered.
3 Replies
Japanese cockleOP
Alternatively, is this a bad pattern? Are there better ways to structure this?
TLDR is I have a side-bar at the root, and the sidebar is rendered differently depending on the user's access control.
TLDR is I have a side-bar at the root, and the sidebar is rendered differently depending on the user's access control.
Dwarf Hotot
You can also check for token refresh and then reload the page using navigation router
Japanese cockleOP
How would you check for the token refresh