GithubHelp home page GithubHelp logo

Comments (11)

Tsjippy avatar Tsjippy commented on June 4, 2024 1

I think it was a time issue. I changed the time zone and now it works ok

from twofactorauth.

RobThree avatar RobThree commented on June 4, 2024

99% sure the time on the server is off (or it's off on the previous one).

from twofactorauth.

Tsjippy avatar Tsjippy commented on June 4, 2024

Can I adjust the time in the database ? Or should I change the time on the server?

from twofactorauth.

RobThree avatar RobThree commented on June 4, 2024

I don't know what time in your database would be related to this? If you check the actual time on the server(s) you'll most likely see one of them is off.

from twofactorauth.

Tsjippy avatar Tsjippy commented on June 4, 2024

yes they are in different time zones:
Server 1: Thu Dec 1 16:25:05 WAT 2022
Server 2: Thu Dec 1 08:25:04 MST 2022

from twofactorauth.

RobThree avatar RobThree commented on June 4, 2024

By default, this library uses time(), which, according to the PHP doc, returns a Unix Timestamp. which is UTC time (and TOTP uses UTC). So either you used a different timeprovider or your timezones aren't configured correctly.

from twofactorauth.

Tsjippy avatar Tsjippy commented on June 4, 2024

I have changed the timezones, now they are in the same timezone, still doesn't work

from twofactorauth.

RobThree avatar RobThree commented on June 4, 2024

Try ensureCorrectTime() (on both servers), see the docs.

If both are OK, please give the output of echo time() on both servers (from (roughly) the same time, no more than a few seconds apart) and share your $discrepancy value, if overridden.

from twofactorauth.

willpower232 avatar willpower232 commented on June 4, 2024

in bash you can do date +"%s"

image

and then compare the output to https://time.is/Unix_time to confirm the values are the same or within a few seconds

from twofactorauth.

Tsjippy avatar Tsjippy commented on June 4, 2024

Thanks both for your replies!
It works again

from twofactorauth.

RobThree avatar RobThree commented on June 4, 2024

Thanks both for your replies!

It works again

Please share with us what the issue was?

from twofactorauth.

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.