From 6d07c9193359b776f1d2ef798c4b22d63bebb24d Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 12 Jun 2023 14:29:46 +0530 Subject: [PATCH] fix: convert to lower case and compare Signed-off-by: Pranav C --- packages/nocodb/src/services/auth.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/nocodb/src/services/auth.service.ts b/packages/nocodb/src/services/auth.service.ts index 287cb16391..9771d36b5c 100644 --- a/packages/nocodb/src/services/auth.service.ts +++ b/packages/nocodb/src/services/auth.service.ts @@ -13,7 +13,9 @@ import type { CreateUserDto } from '../controllers/auth.controller'; export class AuthService { constructor(private usersService: UsersService) {} - async validateUser(email: string, pass: string): Promise { + async validateUser(_email: string, pass: string): Promise { + const email = _email.toLowerCase(); + const user = await this.usersService.findOne(email); if (user) { const { password, salt, ...result } = user;