API Reference
Authentication API
Secure access to the ManoPlan API
The Authentication API provides secure access to ManoPlan resources. It supports email/password authentication as well as OAuth providers like Google.
Overview
ManoPlan uses Better Auth for authentication, providing session-based authentication with secure HTTP-only cookies.
Session-based authentication
OAuth 2.0 support (Google)
Role-based access control
Secure token management
Endpoints
Sign In
POST/api/auth/sign-in/emailAuthenticate with email and password
Sign Up
POST/api/auth/sign-up/emailCreate a new user account
Sign Out
POST/api/auth/sign-outEnd the current session
Get Session
GET/api/auth/sessionGet current session information
User Roles
ManoPlan supports different user roles with varying permissions
Admin
Full access to all features and settings
Office
Access to dispatch, customers, and reports
Technician
Access to assigned jobs and time tracking
Passive
Read-only access, no active permissions
Security Notes
- Always use HTTPS in production
- Store tokens securely, never in localStorage
- Implement proper session timeout handling
- Use role-based access control for all endpoints