In my opinion you should use the middleware of react to check if the cookie is present or not and based on that redirect the user to auth pages or to the dashboard. You can use react router for redirecting. Once the token is found in the cookie you can then call your validation route to check if the user token is valid or not.