Auth Page

export default withAuth(AuthPage, 'auth');
function AuthPage() { /* react component here */ }

Use this for authentication pages such as Login and Register or any other page that suits with the behavior


  • Unauthenticated users can access this page without any loading page

    Try it out!

  • Authenticated users will be redirected to HOME_ROUTE (default: /).
    • Authenticated users will see a flash before getting redirected;
    • We omit the loading spinner—that blocks content flash—in this page to prevent unauthenticated users from seeing annoying loading before they're trying to login;
    • You're expected to hide all links to the auth page when the user is authenticated.

    Try it out!

    After you login, you'll be redirected right to this page, then you'll see a content flash before getting redirected back to the home page.