I am trying to build a HOC for protecting routes of my Client Side React application. The idea is to allow a remote api to verify a user\'s token and based on a set of rules