Options
All
  • Public
  • Public/Protected
  • All
Menu

Options for the withPageAuthRequired Higher Order Component

Hierarchy

  • WithPageAuthRequiredOptions

Index

Properties

Optional onError

onError: undefined | ((error: Error) => Element)
withPageAuthRequired(Profile, {
  onError: error => <div>Error: {error.message}</div>
});

Render a fallback in case of error fetching the user from the profile API route.

Optional onRedirecting

onRedirecting: undefined | (() => Element)
withPageAuthRequired(Profile, {
  onRedirecting: () => <div>Redirecting you to the login...</div>
});

Render a message to show that the user is being redirected to the login.

Optional returnTo

returnTo: undefined | string
withPageAuthRequired(Profile, {
  returnTo: '/profile'
});

Add a path to return the user to after login.