Git Product home page Git Product logo

Comments (6)

 avatar commented on May 18, 2024

Solved my own issue, my computer datetime was not automatically sync'd at the OS level and therefore was out of time vs google's clock and couldn't provide the matching time for recreating OTP.

from speakeasy.

markbao avatar markbao commented on May 18, 2024

Thanks for the update!

from speakeasy.

 avatar commented on May 18, 2024

Not a problem, now it seems I'm having an issue with my clocks not staying in perfect sync after the first QR code is generated (within the first 60 seconds). I was given a suggestion by a colleague who mentioned I should add a slight variance to the code by setting the current unix time -30 seconds and running a loop over it (ie. speakeasy.totp({key: 'secret', time: 159183717});) when verifying TOTP

Would you advice against this or does this seem like an appropriate solution?

from speakeasy.

markbao avatar markbao commented on May 18, 2024

Hmm, that seems to work but it doesn't seem like a clean solution.

So it seems like you get a code at Time 0 (e.g. 159183700) and then, 30 seconds later, you're getting another code at Time 1 (e.g. 159183730) but the Time 1 code is wrong?

from speakeasy.

 avatar commented on May 18, 2024

Again I solved my own issue, the problem this time was that each time I was verifying the code via speakeasy.time({key: '3jk2h5kj2h63kj2h6kjh23jh6hlkj2h6ljk2h3h', encoding: 'base32'}); it was OUTSIDE my route middleware therefore only loading the variable on initial startup but not each subsequent request... Now that i've moved inside my middleware it's functioning as expected. Thanks for your patients!

from speakeasy.

markbao avatar markbao commented on May 18, 2024

Great to hear, thanks!

from speakeasy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.