Options
All
  • Public
  • Public/Protected
  • All
Menu

Module frontend/with-page-auth-required

Index

Client Interfaces

Client Type aliases

Client Type aliases

WithPageAuthRequired

WithPageAuthRequired: <P>(Component: ComponentType<P>, options?: WithPageAuthRequiredOptions) => React.FC<Omit<P, "user">>
const MyProtectedPage = withPageAuthRequired(MyPage);

When you wrap your pages in this Higher Order Component and an anonymous user visits your page they will be redirected to the login page and then returned to the page they were redirected from (after login).

Type declaration