Jump to content
View in the app

A better way to browse. Learn more.

Froxlor Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hallo zusammen,

ich bin neu hier im Forum und freue mich, Teil dieser Community zu sein. 😊
Ich habe kürzlich Froxlor eingerichtet und dabei die E-Mail-basierte Zwei-Faktor-Authentifizierung (2FA) aktiviert.

Bei der Aktivierung habe ich den Code per E-Mail erhalten und erfolgreich eingegeben – alles schien in Ordnung zu sein, und die E-Mail 2FA wurde aktiviert. Nun habe ich allerdings folgendes Problem:

Wenn ich mich einloggen möchte, gebe ich zunächst meinen Benutzernamen und das Passwort ein, wie gewohnt. Anschließend werde ich aufgefordert, den 2FA-Code einzugeben. Ich erhalte den Code per E-Mail, trage ihn im entsprechenden Feld ein und klicke auf "Code überprüfen". Leider bekomme ich danach die Fehlermeldung: "Error: The code entered is not valid."

Hat jemand von euch eine Idee, woran das liegen könnte oder wie ich das Problem beheben kann? Ich wäre sehr dankbar für eure Unterstützung.

Vielen Dank im Voraus und viele Grüße!

Captura desde 2024-08-11 12-00-23.png

Captura desde 2024-08-11 12-00-38.png

Captura desde 2024-08-11 12-00-54.png

Solved by d00p

Go to solution
  • Solution

höchstwahrscheinlich ein zeitproblem, probiere mal folgende Änderung in der index.php:

 

diff --git a/index.php b/index.php
index dd3f2673..2bedb9a8 100644
--- a/index.php
+++ b/index.php
@@ -84,7 +84,8 @@ if ($action == '2fa_entercode') {
                // verify code set to user's data_2fa field
                $sel_stmt = Database::prepare("SELECT `data_2fa` FROM " . $table . " WHERE `" . $field . "` = :uid");
                $userinfo_code = Database::pexecute_first($sel_stmt, ['uid' => $uid]);
-               $result = $tfa->verifyCode($userinfo_code['data_2fa'], $code);
+               // 60sec discrepancy (possible slow email delivery)
+               $result = $tfa->verifyCode($userinfo_code['data_2fa'], $code, 60);
        } else {
                $result = $tfa->verifyCode($_SESSION['secret_2fa'], $code, 3);
        }

 

  • Author
Super, vielen Dank. Das hat das Problem gelöst.
  • 3 weeks later...

Hallo,

bei mir besteht selbiges Problem mit dem 2FA auch seit dem Update auf Froxlor 2.2.0 sowie 2.2.1, kann aber nicht bestätigen bzw nachvollziehen, dass das ein timing-problem sein soll.

Testweise habe ich den verifyCode-Timer von 60 auf 120 erhöht und anschließend php und nginx neugestartet, dennoch konnte ich mich nicht erfolgreich einloggen.

Welche Infos/Logs/etcs wären notwendig, um das näher zu untersuchen?

Schau am besten bei uns im discord vorbei, das geht einfacher und schneller als hier im Forum. Dann schauen wir zusammen Mal wo es ggfls hängt 

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.