POST /auth/login — authentification par email et mot de passe #3

Closed
opened 2026-06-07 06:59:48 +02:00 by Gato · 0 comments
Owner

Contexte

L'écran de connexion (LoginScreen) envoie un email et un mot de passe. Actuellement mockée via apiAuth: false dans environment.ts — tout couple email/password non vide est accepté.

Problème

Aucun endpoint d'authentification n'existe. AuthService.login() retourne toujours l'utilisateur mock papa@famille.fr.

Besoin

POST /auth/login

Corps de requête :

{ "email": "string", "password": "string" }

Réponse attendue (200) :

{
  "email": "string",
  "name": "string",
  "role": "admin" | "member",
  "token": "string"
}

Erreur (401) :

{ "message": "Identifiants invalides" }

Le token JWT retourné sera stocké et envoyé dans les appels suivants via Authorization: Bearer <token>.

Priorité

Bloquant

## Contexte L'écran de connexion (`LoginScreen`) envoie un email et un mot de passe. Actuellement mockée via `apiAuth: false` dans `environment.ts` — tout couple email/password non vide est accepté. ## Problème Aucun endpoint d'authentification n'existe. `AuthService.login()` retourne toujours l'utilisateur mock `papa@famille.fr`. ## Besoin `POST /auth/login` Corps de requête : ```json { "email": "string", "password": "string" } ``` Réponse attendue (200) : ```json { "email": "string", "name": "string", "role": "admin" | "member", "token": "string" } ``` Erreur (401) : ```json { "message": "Identifiants invalides" } ``` Le token JWT retourné sera stocké et envoyé dans les appels suivants via `Authorization: Bearer <token>`. ## Priorité Bloquant
Gato closed this issue 2026-06-07 08:26:14 +02:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Gato/Olhar-API#3