Advanced Topic: Authentication
Platform Authentication Flow
Understanding how users log into your tenant is crucial for support. Arzavo handles authentication securely via the `TenantLoginController`.
The Registration Flow
- A user navigates to your tenant's `/account/register` route.
- They input their Name, Email, Username, and Password.
- The system creates a new `App\Models\Tenant\User` record in your isolated database.
- Important: By default, this user is assigned the role of
studentand their status is marked as Pending or Active depending on your global settings.
The Login Flow
Users use the `/account/login` route. Upon successful authentication, the system checks their role (`Auth::guard('tenant')->user()->role`) and redirects them to the appropriate dashboard (`/students-dashboard`, `/teachers-dashboard`, or `/admin/dashboard`).