Browse Source

fix: convert to lower case and compare

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5868/head
Pranav C 1 year ago
parent
commit
6d07c91933
  1. 4
      packages/nocodb/src/services/auth.service.ts

4
packages/nocodb/src/services/auth.service.ts

@ -13,7 +13,9 @@ import type { CreateUserDto } from '../controllers/auth.controller';
export class AuthService { export class AuthService {
constructor(private usersService: UsersService) {} constructor(private usersService: UsersService) {}
async validateUser(email: string, pass: string): Promise<any> { async validateUser(_email: string, pass: string): Promise<any> {
const email = _email.toLowerCase();
const user = await this.usersService.findOne(email); const user = await this.usersService.findOne(email);
if (user) { if (user) {
const { password, salt, ...result } = user; const { password, salt, ...result } = user;

Loading…
Cancel
Save