The window of TOTP acts as time drift and specifies how long each code is valid for.
    The period, which is the time between newly generated codes, is 30 seconds.
    If the window is 15 (the default) and the current timestamp is 147682209, the OTP tested are within 147682194 (147682209 - 15), 147682209 and 147682224 (147682209 + 15).
    The window shall be lower than 30. Therefore, this test includes the previous OTP but not the next one.
    You can set this to a higher value (up to 29) as a workaround if your user's device clocks are often slightly wrong.