Skip to content

Commit

Permalink
CRYP-56 Update login via email
Browse files Browse the repository at this point in the history
  • Loading branch information
thongnguyen5 authored and thongnguyendev committed May 8, 2024
1 parent e1f11a1 commit 700da5f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/apps/onebox/src/modules/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export class AuthService {
throw ErrorCode.ACCOUNT_NOT_FOUND.asException();
}

if (user.status && user.status !== UserStatus.Active) {
throw ErrorCode.ACCOUNT_NOT_ACTIVE.asException();
}

const loginToken = generateUUID();
const tokenExpire = Date.now() + 5 * 60 * 1000; // 5 minutes
await this.userModel.updateOne(
Expand Down

0 comments on commit 700da5f

Please sign in to comment.