kspearrin / kspearrin/Otp.NET

[Feature Request] Restart an existing window

Open
#73 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
1.3k
Forks
179
PR merge metrics
No merged PRs in 30d

Description

Unless I am missing something, I would like to manually restart the timer upon a successful verification. I tried using WindowStart() but it didn't seem to do anything. I am using DUO and the timer does not reset to 30 `seconds.

        public static bool VerifyTotp(string base32Secret, string userCode)
        {
            var totp = new Totp(Base32Encoding.ToBytes(base32Secret));

            if (totp.VerifyTotp(userCode, out _, VerificationWindow.RfcSpecifiedNetworkDelay))
            {
                totp.WindowStart();
                return true;
            }
            return false;

The documation does not elaborate on WindowStart.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by tracing the VerifyTotp and WindowStart entry points shown in the issue, then check how an existing TOTP window is represented and restarted. Confirm the intended behavior for a manually restarted timer and update the API or its documentation accordingly; no specific files or tests are named, so add or run the relevant verification coverage you find.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
authentication, security
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.