Does plugins run after server middlewares?
I have a module plugin like
The plugin checks if the token is expired and refreshes it on the SSR. I am trying to get the refreshed token in the server middleware so i can fetch the currently logged in user in the server. But it seems like the server middlewares are run first before the plugin ever runs.
I need to use plugin to make the SSR auth work.
How do i get the refreshed token in the middleware so i can fetch for the user?
plugin.ts:The plugin checks if the token is expired and refreshes it on the SSR. I am trying to get the refreshed token in the server middleware so i can fetch the currently logged in user in the server. But it seems like the server middlewares are run first before the plugin ever runs.
I need to use plugin to make the SSR auth work.
How do i get the refreshed token in the middleware so i can fetch for the user?