From 72d4ad4c456777bed0eb4390ff7162e28ff10e05 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 22 Feb 2023 14:53:36 +0900 Subject: [PATCH] fix type --- packages/backend/src/server/api/SigninApiService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/server/api/SigninApiService.ts b/packages/backend/src/server/api/SigninApiService.ts index 6451d7c2a..bd3d8a28d 100644 --- a/packages/backend/src/server/api/SigninApiService.ts +++ b/packages/backend/src/server/api/SigninApiService.ts @@ -1,7 +1,7 @@ import { randomBytes } from 'node:crypto'; import { Inject, Injectable } from '@nestjs/common'; import bcrypt from 'bcryptjs'; -import * as OTPAuth from "otpauth"; +import * as OTPAuth from 'otpauth'; import { IsNull } from 'typeorm'; import { DI } from '@/di-symbols.js'; import type { UserSecurityKeysRepository, SigninsRepository, UserProfilesRepository, AttestationChallengesRepository, UsersRepository } from '@/models/index.js'; @@ -156,7 +156,7 @@ export class SigninApiService { } const delta = OTPAuth.TOTP.validate({ - secret: OTPAuth.Secret.fromBase32(profile.twoFactorSecret), + secret: OTPAuth.Secret.fromBase32(profile.twoFactorSecret!), digits: 6, token, window: 1,