Skip to content

Commit

Permalink
Merge pull request #13 from lsbyerley/dev
Browse files Browse the repository at this point in the history
chore: pkg updates 20241102
  • Loading branch information
lsbyerley authored Nov 2, 2024
2 parents 38b6bb3 + 7b0fcda commit 3d920ea
Show file tree
Hide file tree
Showing 7 changed files with 1,637 additions and 1,545 deletions.
4 changes: 2 additions & 2 deletions app/routes/_auth+/verify.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export async function prepareVerification({
const verifyUrl = getRedirectToUrl({ request, type, target })
const redirectTo = new URL(verifyUrl.toString())

const { otp, ...verificationConfig } = generateTOTP({
const { otp, ...verificationConfig } = await generateTOTP({
algorithm: 'SHA256',
// Leaving off 0 and O on purpose to avoid confusing users.
charSet: 'ABCDEFGHIJKLMNPQRSTUVWXYZ123456789',
Expand Down Expand Up @@ -129,7 +129,7 @@ export async function isCodeValid({
select: { algorithm: true, secret: true, period: true, charSet: true },
})
if (!verification) return false
const result = verifyTOTP({
const result = await verifyTOTP({
otp: code,
...verification,
})
Expand Down
2 changes: 1 addition & 1 deletion app/routes/settings+/profile.two-factor.index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function loader({ request }: LoaderFunctionArgs) {

export async function action({ request }: ActionFunctionArgs) {
const userId = await requireUserId(request)
const { otp: _otp, ...config } = generateTOTP()
const { otp: _otp, ...config } = await generateTOTP()
const verificationData = {
...config,
type: twoFAVerifyVerificationType,
Expand Down
4 changes: 4 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ import { default as defaultConfig } from '@epic-web/config/eslint'
export default [
...defaultConfig,
// add custom config objects here:
{
files: ['**/tests/**/*.ts'],
rules: { 'react-hooks/rules-of-hooks': 'off' },
},
]
Loading

0 comments on commit 3d920ea

Please sign in to comment.