|
|
@@ -144,9 +144,9 @@ export class UsersService implements OnModuleInit {
|
|
|
if (!isMatch) {
|
|
|
throw new UnauthorizedException('Username and password doesn\'t match')
|
|
|
}
|
|
|
- // if (users.twoFactorCode) {
|
|
|
- // return 'success'
|
|
|
- // }
|
|
|
+ if (users.twoFactorCode) {
|
|
|
+ return 'success'
|
|
|
+ }
|
|
|
const key = await generateKey(username)
|
|
|
console.log('key', key)
|
|
|
users.twoFactorCode = key.secret
|