@auth0/auth0-react
    Preparing search index...

    Function withAuthenticationRequired

    • const MyProtectedComponent = withAuthenticationRequired(MyComponent);
      

      When you wrap your components in this Higher Order Component and an anonymous user visits your component they will be redirected to the login page; after login they will be returned to the page they were redirected from.

      Type Parameters

      • P extends object

      Parameters

      Returns FC<P>