Skip to main content
Vito Business OS exposes two authentication surfaces that serve different clients:
  • Web (session-based) — Inertia React pages for human users. Powered by Laravel’s built-in session guard.
  • API (token-based) — REST endpoints for mobile apps and third-party integrations. Powered by Laravel Sanctum.
Neither surface shares state with the other. A valid Sanctum token does not establish a session, and a session cookie is not accepted by auth:sanctum routes.

Auth surfaces at a glance

MethodDriverGuardPrimary use caseBase path
SessionsessionwebInertia React UI, Filament admin/
Sanctum tokensanctumapiMobile apps, REST API clients/api/v1
OTP (passwordless)CustomapiConsumer login without a password/api/v1/otp
Social OAuthSocialite / SanctumapiGoogle, Facebook, Apple, GitHub, Twitter/api/v1/auth/social

Security features

Rate limiting is applied at the route level using named throttle aliases:
  • throttle:api — general API rate limit
  • throttle:api.otp-generation — strict limit on OTP generation (3 requests/hour per identifier)
  • throttle:api.verification — limit on OTP and coupon verification attempts
  • throttle:api.transactions — limit on order creation
Idempotency middleware wraps OTP generation so that clients can safely retry the same request without sending multiple codes. Signed URLs protect email verification links (/verify-email/{id}/{hash}) and file download endpoints. Tenant ownership isolation is enforced by the tenant.ownership middleware on all protected tenant routes, preventing cross-tenant data access (IDOR). Session rotation is performed on login and impersonation exit to prevent session-fixation attacks.

Explore auth topics

Web authentication

Register, login, password reset, email verification, and profile management via Inertia React pages.

API authentication

Sanctum token issuance, protected routes, and push subscription management.

One-time passwords

Passwordless login flow with OTP generation, verification, and idempotency.

Social login

OAuth via Google, Facebook, Apple, GitHub, and Twitter through a single API endpoint.

Roles and permissions

Spatie Permission roles, tenant ownership middleware, and impersonation.

Build docs developers (and LLMs) love