Skip to content

Commit 3d920ea

Browse files
authored
Merge pull request #13 from lsbyerley/dev
chore: pkg updates 20241102
2 parents 38b6bb3 + 7b0fcda commit 3d920ea

File tree

7 files changed

+1637
-1545
lines changed

7 files changed

+1637
-1545
lines changed

app/routes/_auth+/verify.server.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export async function prepareVerification({
8888
const verifyUrl = getRedirectToUrl({ request, type, target })
8989
const redirectTo = new URL(verifyUrl.toString())
9090

91-
const { otp, ...verificationConfig } = generateTOTP({
91+
const { otp, ...verificationConfig } = await generateTOTP({
9292
algorithm: 'SHA256',
9393
// Leaving off 0 and O on purpose to avoid confusing users.
9494
charSet: 'ABCDEFGHIJKLMNPQRSTUVWXYZ123456789',
@@ -129,7 +129,7 @@ export async function isCodeValid({
129129
select: { algorithm: true, secret: true, period: true, charSet: true },
130130
})
131131
if (!verification) return false
132-
const result = verifyTOTP({
132+
const result = await verifyTOTP({
133133
otp: code,
134134
...verification,
135135
})

app/routes/settings+/profile.two-factor.index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
2929

3030
export async function action({ request }: ActionFunctionArgs) {
3131
const userId = await requireUserId(request)
32-
const { otp: _otp, ...config } = generateTOTP()
32+
const { otp: _otp, ...config } = await generateTOTP()
3333
const verificationData = {
3434
...config,
3535
type: twoFAVerifyVerificationType,

eslint.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ import { default as defaultConfig } from '@epic-web/config/eslint'
44
export default [
55
...defaultConfig,
66
// add custom config objects here:
7+
{
8+
files: ['**/tests/**/*.ts'],
9+
rules: { 'react-hooks/rules-of-hooks': 'off' },
10+
},
711
]

0 commit comments

Comments
 (0)