MFA Code suddenly wrong #3428

Closed
opened 2026-02-05 06:41:16 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @ArneNaessens on GitHub (Jan 5, 2023).

Describe the Bug

Have been using bookstack for over a year now with MFA code enabled on both my account and another user.

Since ( i guess ) the latest update to v22.11.1 bookstack has ( sometimes ) stopped accepting my MFA codes.
Error: The provided code is not valid or has expired.

I have to fill in my code multiple times until it accepts it.

I tried removing my MFA end reenabling it but it gives the same error on the setup page of the MFA
afbeelding

Steps to Reproduce

  1. Visit bookstack
  2. Fill in username / password
  3. fill in MFA Code
  4. Error The provided code is not valid or has expired

Expected Behaviour

Successfull login with MFA code

Screenshots or Additional Context

afbeelding

Browser Details

Firefox 108.0.1 64bit and Chrome 108.0.5359.125 64bit

Exact BookStack Version

v22.11.1

PHP Version

Unknown ( docker version )

Hosting Environment

Installed on docker in synology.

Originally created by @ArneNaessens on GitHub (Jan 5, 2023). ### Describe the Bug Have been using bookstack for over a year now with MFA code enabled on both my account and another user. Since ( i guess ) the latest update to v22.11.1 bookstack has ( sometimes ) stopped accepting my MFA codes. Error: The provided code is not valid or has expired. I have to fill in my code multiple times until it accepts it. I tried removing my MFA end reenabling it but it gives the same error on the setup page of the MFA ![afbeelding](https://user-images.githubusercontent.com/16622722/210806268-25f27883-1b2c-48fb-b0ca-57b3a018111b.png) ### Steps to Reproduce 1. Visit bookstack 2. Fill in username / password 3. fill in MFA Code 4. Error The provided code is not valid or has expired ### Expected Behaviour Successfull login with MFA code ### Screenshots or Additional Context ![afbeelding](https://user-images.githubusercontent.com/16622722/210806504-31149e15-da5e-4754-9613-a664bf43ad97.png) ### Browser Details Firefox 108.0.1 64bit and Chrome 108.0.5359.125 64bit ### Exact BookStack Version v22.11.1 ### PHP Version Unknown ( docker version ) ### Hosting Environment Installed on docker in synology.
OVERLORD added the 🐛 Bug label 2026-02-05 06:41:16 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jan 5, 2023):

Hi @ArneNaessens, since TOTP (The MFA method in use) is time-sensitive issues like these can often be due to systems times being out of sync. Could you check the system time across the following systems to ensure it's current and in-sync (Correct to the second ideally):

  • The device being used to generate TOTP codes.
  • The host Synology system.
  • The docker container instance itself.
@ssddanbrown commented on GitHub (Jan 5, 2023): Hi @ArneNaessens, since TOTP (The MFA method in use) is time-sensitive issues like these can often be due to systems times being out of sync. Could you check the system time across the following systems to ensure it's current and in-sync (Correct to the second ideally): - The device being used to generate TOTP codes. - The host Synology system. - The docker container instance itself.
Author
Owner

@ArneNaessens commented on GitHub (Jan 5, 2023):

Time of synology was synced to an AD server that didn't exist anymore.
Changed the ntp to google's ntp pool.
Restarted docker container ( just to be sure ).

Seems to be working again.
Thanks!

@ArneNaessens commented on GitHub (Jan 5, 2023): Time of synology was synced to an AD server that didn't exist anymore. Changed the ntp to google's ntp pool. Restarted docker container ( just to be sure ). Seems to be working again. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3428