Options
All
  • Public
  • Public/Protected
  • All
Menu

Module with-authentication-required

Index

Functions

Const default

  • 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 and returned to the page they we're redirected from after login.

    Type parameters

    • P: object

    Parameters

    Returns FC<P>