Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
♻️ Use import instead of import type
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Oct 29, 2020
1 parent a166eaa commit e69cc37
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/modules/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import {
Injectable,
NotFoundException,
UnauthorizedException,
UnprocessableEntityException
UnprocessableEntityException,
} from '@nestjs/common';
import { randomStringGenerator } from '@nestjs/common/utils/random-string-generator.util';
import { ConfigService } from '@nestjs/config';
import { JwtService } from '@nestjs/jwt';
import type { Authenticator } from '@otplib/core';
import { Authenticator } from '@otplib/core';
import { users } from '@prisma/client';
import { compare, hash } from 'bcrypt';
import { authenticator } from 'otplib';
Expand All @@ -37,10 +37,12 @@ export class AuthService {
private pwnedService: PwnedService,
private tokensService: TokensService,
) {
this.authenticator = authenticator.create({ window: [
this.configService.get<number>('security.totpWindowPast'),
this.configService.get<number>('security.totpWindowFuture'),
] });
this.authenticator = authenticator.create({
window: [
this.configService.get<number>('security.totpWindowPast'),
this.configService.get<number>('security.totpWindowFuture'),
],
});
}

async validateUser(email: string, password?: string): Promise<number> {
Expand Down

0 comments on commit e69cc37

Please sign in to comment.