Two-factor authentication doesn't work

I've enabled 2-factor authentication on my site, but I cannot verify it in my profile. I'm getting the following error every time:
Your OTP code is incorrect. Please try again.