Git Product home page Git Product logo

Comments (10)

rubemz avatar rubemz commented on June 11, 2024

I had a similar problem and the solution was to sync the server date/time. We have used rdate command for that.

from google-authenticator.

rubemz avatar rubemz commented on June 11, 2024

Also if you think your server already has the correct time, you can set a drift option to set how much the server and client time can drift apart.

https://github.com/jaredonline/google-authenticator#drift

from google-authenticator.

reginato avatar reginato commented on June 11, 2024

I will test this.
My drift value is 31 like a document, but i will increment.

thanks

from google-authenticator.

reginato avatar reginato commented on June 11, 2024

Time local: 2014-07-10 12:19:24 -0300
Time server: 2014-07-10 12:19:55 +0000

from google-authenticator.

jaredonline avatar jaredonline commented on June 11, 2024

Hey @reginato looks like you nailed down the problem. You have 31 seconds of drift between your server and your local time. You might want to reset your server time.

from google-authenticator.

rubemz avatar rubemz commented on June 11, 2024

@reginato and it looks like your server is in another Time Zone... shouldn't it have a 3 hours difference from your local? so that they would be sync

from google-authenticator.

rubemz avatar rubemz commented on June 11, 2024

the rotp library that google-authenticator uses is TZ aware

https://github.com/mdp/rotp/blob/fc70b116d59001fac8ffca2bc2acd668ea8611b7/lib/rotp/totp.rb#L14-L64

from google-authenticator.

reginato avatar reginato commented on June 11, 2024

Thanks guys works.... finally

from google-authenticator.

rubemz avatar rubemz commented on June 11, 2024

@reginato cool! What was the fix? (just curious :)

from google-authenticator.

reginato avatar reginato commented on June 11, 2024

Just incremented the drift value.
I saw this Rotp library is very usefull

from google-authenticator.

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.