Browse Source

-

pull/6029/head
Joarley Santos 1 week ago
parent
commit
9ac90e6773
  1. 4
      apps/api/src/app/auth/auth.service.ts
  2. 2
      apps/api/src/app/user/user.controller.ts
  3. 1
      apps/api/src/app/user/user.service.ts

4
apps/api/src/app/auth/auth.service.ts

@ -25,6 +25,10 @@ export class AuthService {
salt: this.configurationService.get('ACCESS_TOKEN_SALT') salt: this.configurationService.get('ACCESS_TOKEN_SALT')
}); });
//if (!this.configurationService) console.log('config service exists');
//const hashedAccessToken = accessToken; // TEMPORARY REMOVE HASHING FOR TESTING PURPOSES ONLY
const [user] = await this.userService.users({ const [user] = await this.userService.users({
where: { accessToken: hashedAccessToken } where: { accessToken: hashedAccessToken }
}); });

2
apps/api/src/app/user/user.controller.ts

@ -207,6 +207,8 @@ export class UserController {
password: accessToken, password: accessToken,
salt: this.configurationService.get('ACCESS_TOKEN_SALT') salt: this.configurationService.get('ACCESS_TOKEN_SALT')
}); });
//const hashedAccessToken = accessToken; // TEMPORARY REMOVE HASHING FOR TESTING PURPOSES ONLY
//if (!this.configurationService) console.log('config service exists');
const [user] = await this.userService.users({ const [user] = await this.userService.users({
where: { accessToken: hashedAccessToken, id: userId } where: { accessToken: hashedAccessToken, id: userId }

1
apps/api/src/app/user/user.service.ts

@ -92,6 +92,7 @@ export class UserService {
password: accessToken, password: accessToken,
salt: this.configurationService.get('ACCESS_TOKEN_SALT') salt: this.configurationService.get('ACCESS_TOKEN_SALT')
}); });
//const hashedAccessToken = accessToken; // TEMPORARY REMOVE HASHING FOR TESTING PURPOSES ONLY
return { accessToken, hashedAccessToken }; return { accessToken, hashedAccessToken };
} }

Loading…
Cancel
Save