Bubka / 2FAuth

A Web app to manage your Two-Factor Authentication (2FA) accounts and generate their security codes
https://docs.2fauth.app/
GNU Affero General Public License v3.0
2.1k stars 140 forks source link

summer time in france #86

Closed gwlegion closed 2 years ago

gwlegion commented 2 years ago

Hi got wrong codes... i think it's due to france summer time . in fance, we add 1 hour when it's summer... many application don't care about this problem

Bubka commented 2 years ago

Hi, I cannot reproduce the issue and... I'm french 😃 I just logged in 2 US platforms, all the codes were valid.

What is your running environment? local server? web server? Docker?

gwlegion commented 2 years ago

i use a RPI at home ... with yuno host, and with the web interface. and i'm not the only one with this issue ... probably cause my rpi is at french time ? you use it at home too ?

Bubka commented 2 years ago

I use many execution envs for my dev/test/own usage but none of them use a RPI. For now, whatever the environment I used or the website I had to login, I never encountered such an issue. Of course this does not mean there is no problem. I'll try to set up an env where the server time is intentionally changed to check the behavior.

gwlegion commented 2 years ago

if i can help you, don't hesitate to contact me ... if you need, i can show you my server.

edit : got another problem : i can't delete an account ... if you want we can talk with discord

gwlegion commented 2 years ago

found something : the problem don't concernt time sync but qrcode scan. when i scan the QR code, the secret is not the right one ... so the code is not good . i copied the secret by myself ant that works

Bubka commented 2 years ago

In Settings > Options > Data input , check Use basic QR code reader and add your account again. Does the secret is still the wrong one?

edit : got another problem : i can't delete an account ...

Please open a dedicated issue

gwlegion commented 2 years ago

will try it, but i don't know how to get a qr code as a picture to upload it ... i use aegis on my phone. maybe the problem come from aegis itself.

gwlegion commented 2 years ago

tried with the basic qr code ... got the same problem something strange : when i upload the qr code, i got a validation page with the generated code ... this one is good ... changing correclty. but when i accept the new account, next code are bad.

Bubka commented 2 years ago

Please upgrade to PHP7.4 and retry. See https://github.com/Bubka/2FAuth/issues/87#issuecomment-1141811238

gwlegion commented 2 years ago

will try, tell you when it's done (maybe in the last updates)

gwlegion commented 2 years ago

i got 7.3 7.4 and 8.0 installed ... how i can check the version 2fauth used ?

Bubka commented 2 years ago

This is not a 2FAuth setting, you have to change your server configuration.

Some useful resources to achieve this: https://opensenselabs.com/blog/tech/change-php-version-drupal-website-apache-nginx https://magento.stackexchange.com/questions/272815/how-to-switch-between-php-versions-on-ubuntu-nginx

gwlegion commented 2 years ago

in my nginx config file relative to 2faut i got this : fastcgi_pass unix:/var/run/php/php8.0-fpm-2fauth.sock looks like i use php 8.0

and find 2faut in /etc/php/8.0/fpm/pool.d/

maybe it's relative to this php version ? can you try with php 8.0 and see if you got the same errors ?

Bubka commented 2 years ago

I was able to reproduce the invalid password generation, it's a regression introduced by the v3.1.0 on the create form. I push a fix asap.