Two Factor Authentication fails


After enabling the two factor authentication, when i tryy to login i get the message “Whoops, looks like something went wrong.” and i can’t login to my (self-hosted) account.

Any indication why?
How can i disable it until the problem is solved ?

Thank you

Please check the logs in storage/logs/laravel-error.log for more details.

You can disable it by clearing users.google_2fa_secret in the database

If you upgraded the code from GitHub did you run composer install?

[2017-11-14 07:41:42] production.ERROR: Symfony\Component\Debug\Exception\FatalErrorException [64] : /home/imagemag/public_html/ninja/vendor/paragonie/constant_time_encoding/src/Base32.php [Line 42] => Default value for parameters with a class type hint can only be NULL {“context”:“PHP”,“user_id”:0,“account_id”:0,“user_name”:"",“method”:“POST”,“url”:“https://**/validate_two_factor/vJrtmSlm90yMKbCdD8d6ynG0J5qkM3gR",“previous”:"https:///validate_two_factor/vJrtmSlm90yMKbCdD8d6ynG0J5qkM3gR”,“user_agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.89 Safari/537.36”,“ip”:“”,“count”:1,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”} []

This is what i get.

Which version of PHP are you using? This feature may require PHP 7

You know how to disable it from the DB ?

Clear users.google_2fa_secret in the database

Any fix for this? I had the same issue so i restored the database to get things back working. now i know how to fix it again.

OK, i just changed to PHP 7.0 and it works! Thanks!