diff --git a/backend/src/routes/auth/auth.service.ts b/backend/src/routes/auth/auth.service.ts index bced215..506c22c 100644 --- a/backend/src/routes/auth/auth.service.ts +++ b/backend/src/routes/auth/auth.service.ts @@ -140,7 +140,9 @@ export class AuthService { async verifyCreatePasswordToken(token: string) { const cleanedToken = token?.trim(); if (!cleanedToken) { - throw new BadRequestException('Token manquant'); + // #118: côté front, un token absent doit être traité comme lien invalide/expiré. + // On renvoie donc la même réponse neutre 404 que pour les autres cas invalides. + throw new NotFoundException('Token invalide, expiré, ou déjà utilisé.'); } const user = await this.usersRepo.findOne({