Skip to main content

AuthPage

The sign-in screen: login, forgotten password, optional registration and the MFA step.

SchemaAdmin mounts it by default. Pass it explicitly to supply your own forms, or replace authPage entirely for a different screen.

Example​

import {SchemaAdmin, AuthPage} from 'habarico';

<SchemaAdmin
authPage={() => <AuthPage RegisterComponent={RegisterForm} />}
{...rest}
/>

Props​

NameTypeDefaultDescription
LoginComponentLoginComponentbuilt-in formReplaces the login form
ForgottenPasswordComponentForgottenPasswordComponentbuilt-in formReplaces the forgotten-password form
RegisterComponentRegisterComponent—Adds a registration form; a link to it appears on the login form only when this is set
onLoginSuccess / onLoginError() => void / (error: Error) => void—Run after a successful or failed sign-in
onRegisterSuccess / onRegisterError() => void / (error: Error) => void—The same for the registration form
onForgottenPasswordSuccess / onForgottenPasswordError() => void / (error: Error) => void—The same for the forgotten-password form
logoLogoSlotthe "no logo" placeholder{Component} — logo in the header
availableLanguagesLayoutLanguage[]—Languages offered by the header switcher

Mounted by SchemaAdmin, the last two are filled from its LogoComponent and availableLanguages props. The page is framed by AuthLayout.

Which steps appear depends on the AuthProvider: without resetPassword there is no forgotten-password link, without requestMfaChallenge / verifyMfa there is no MFA step, and without getSsoLoginMethods the login form shows no SSO buttons — see SSO login methods.

See also​