useState and redirection losing value
I'm using
Does anyone have any suggestions?
useState within my auth plugin and during the SSR, it redirects to the login page if they are not authenticated. It's also capturing the current path and saves it in a useState ref, however, when the redirect happens, it's doing an HTTP redirect, which basically creates a new request to the server which seems to re-call the ssr and that re-runs the plugin but this time it doesn't know about the previous requests path.Does anyone have any suggestions?