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

  1. A user navigates to your tenant's `/account/register` route.
  2. They input their Name, Email, Username, and Password.
  3. The system creates a new `App\Models\Tenant\User` record in your isolated database.
  4. Important: By default, this user is assigned the role of student and 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`).