TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/RespondeIA-APP/front/llms.txt
Use this file to discover all available pages before exploring further.
authService.login method is the frontend service layer that handles user authentication. This method calls the backend /api/login endpoint and manages the authentication flow.
This documentation covers the frontend service layer from the RespondeIA frontend repository. The backend API endpoints are hosted separately.
Source Code
Frommodules/auth/services/auth.service.ts:
Parameters
Login credentials object containing email and password.
Returns
Returns a Promise that resolves to the parsed JSON response from the backend API.Error Handling
Throws anError with message 'Credenciales incorrectas' when the API response is not ok (!res.ok).
Usage Example
Frommodules/auth/hooks/useLogin.ts:
LoginForm.tsx:
Related
authService.register
Register new users
useLogin Hook
React Query hook wrapping the login service
LoginForm Component
UI component using the login service
useAuthStore
Zustand store for authentication state
