FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Time drift with OTP

    Scheduled Pinned Locked Moved Q&A
    two factortime skew
    2 Posts 1 Posters 3.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • danD
      dan
      last edited by

      How sensitive is Fusionauth to “Server Time Drift” with regard to 2FA verification for /api/two-factor/login?

      Example: I’ve got some dev instances on 1.19.7.

      I’ve added/enabled 2FA for a user. But no matter what I do, the server responds with:

      242 (with twoFactorId)
      421 (with correct code + twoFactorId params)

      The only item of note is that the server / VM is about 1 minute 10ish seconds ahead of my personal machine.

      --
      FusionAuth - Identity Without Constraints
      https://fusionauth.io

      1 Reply Last reply
      Reply Quote 0
      • danD
        dan
        last edited by

        The code is considered valid for n -1, n and n + 1 time steps. We use a 30s time step, so I think this would max out at 59s for a skew tolerance. In your case, if you have up to 70s of skew, this would plausibly break TOTP 2FA.

        --
        FusionAuth - Identity Without Constraints
        https://fusionauth.io

        1 Reply Last reply
        Reply Quote 0
        • danD dan moved this topic from Q&A on
        • danD dan moved this topic from Frequently Asked Questions (FAQ) on

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post