Skip to content

Conversation

@gradinarufelix
Copy link

Add totpVerificationWindow setting to allow operators to configure the tolerance for TOTP code verification.

  • Add optional $window parameter to TOTPService::checkIfOtpIsValid()
  • Inject configuration in LoginController and BackendController
  • Default to 0 (strict, original behavior) for backward compatibility
  • Document the new setting in README.md

Setting totpVerificationWindow to 1 is recommended as it prevents authentication failures caused by:

  • Clock drift between user device and server
  • Period boundary race conditions (code generated at end of period)
  • Network latency during code submission

Add totpVerificationWindow setting to allow operators to configure
the tolerance for TOTP code verification.

- Add optional $window parameter to TOTPService::checkIfOtpIsValid()
- Inject configuration in LoginController and BackendController
- Default to 0 (strict, original behavior) for backward compatibility
- Document the new setting in README.md

Setting totpVerificationWindow to 1 is recommended as it prevents
authentication failures caused by:
- Clock drift between user device and server
- Period boundary race conditions (code generated at end of period)
- Network latency during code submission
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant