AilitaProvider wrapping your app, AuthGuard protecting a route, LoginForm handling authentication, and useAuth displaying the current user.
What you’ll build
providers.tsx— AilitaProvider wrapper with tenant config(protected)/layout.tsxorProtectedRoute.tsx— AuthGuard route protectionlogin/page.tsxorLoginPage.tsx— Login page with LoginFormdashboard/page.tsxorDashboardPage.tsx— Protected page using useAuth
Install and configure
Add a login page with LoginForm
LoginForm handles all login states internally: password submission, OTP challenges, TOTP verification, and TOTP setup on first admin login. No additional wiring required for the basic case.Next steps
AilitaProvider props
Full prop reference for slug, appId, baseUrl, onSessionExpired, and more.
AuthGuard patterns
Role-based access, loadingFallback, and the UX-gate security model.

