Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcath committed Oct 3, 2024
1 parent 2d05e5b commit 2f6e065
Show file tree
Hide file tree
Showing 4 changed files with 186 additions and 134 deletions.
2 changes: 1 addition & 1 deletion app/routes/app.user.totp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const loader = async ({request}: LoaderFunctionArgs) => {

const state = totp.totpSecret !== ''

const genTotp = generateTOTP()
const genTotp = await generateTOTP()
const otpUri = getTOTPAuthUri({
...genTotp,
accountName: totp.email,
Expand Down
6 changes: 3 additions & 3 deletions app/routes/app_.login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ export const action = async ({request}: ActionFunctionArgs) => {

if (user.totpSecret !== '' && otp !== null) {
const result =
verifyTOTP({
(await verifyTOTP({
otp,
secret: user.totpSecret,
algorithm: user.totpAlgorithm,
algorithm: user.totpAlgorithm === 'SHA1' ? 'SHA-1' : user.totpAlgorithm,
digits: user.totpDigits,
period: user.totpPeriod
}) !== null
})) !== null

if (!result) {
return json(
Expand Down
Loading

0 comments on commit 2f6e065

Please sign in to comment.