Skip to content

Commit 8392ff9

Browse files
committed
fixing login with 2fa
1 parent 6fd2a27 commit 8392ff9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/resolvers/2fa.resolvers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface Disable2FAInput {
1717
email: string
1818
}
1919

20-
const SECRET: string = process.env.SECRET ?? 'test_secret'
20+
const SECRET = (process.env.SECRET as string) || 'mysq_unique_secret'
2121
const resolvers = {
2222
Mutation: {
2323
enableTwoFactorAuth: async (_: any, { email }: Enable2FAInput) => {

src/utils/2WayAuthentication.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function generateOtp(length = 6): string {
88
}
99
return otp
1010
}
11-
const SECRET: string = process.env.SECRET ?? 'test_secret'
11+
const SECRET = (process.env.SECRET as string) || 'mysq_unique_secret'
1212

1313
export function encodeOtpToToken(otp: string, email: string): string {
1414
const payload = { otp, email }

0 commit comments

Comments
 (0)