The library is not accepting the code generated by the authenticator app.

Open
#21 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript

Research direction

Start by reproducing the mismatch between an authenticator app's code and the library's generateTOTP and verifyTOTP functions, then inspect those functions and the current integer handling. Done means agreeing on a compatible algorithm or API behavior and demonstrating that codes generated and verified in both cases work correctly.

Written by the indexing model from the issue text.

Description

I suspect because the phone uses a 32bit integer and the library is now using BigInt. Would it be possible to keep the old algorithm as a separate function so people who want to use the library with a phone can use it or come up with a solution that allows the generateTOTPand verifyTOTP functions to work in both cases?

Dominant language
JavaScript
Stars
338
Forks
15
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.