In few last month i detect issue at TeamViewer "Two factor authentication" (At second step password). A lot of times i was falling on message that "The security code you entered was invalid. Please login again." As everybody i was thinking like all folks looks like, did mistake at username or password or even in security code durring typing. But I took my credentials to notepad and reverifiy my self and understood that there is no mistake. So i starting a little analysis to understand what is the root cause for this issue.
The security code is incorrect.
Second steps code generation is based on TOTP (Time-based One-time Password algorithm). So if you do understand current issue is related to time :-)
After few tries of loggin i did understand that my security code is allways wrong till there is 10~5 seconds left for new password generation. At this period of time, my security code becomes vaild. For now its even 5 sec and less...
So this means that server \ service \ algorithm that is responsible for security code generation is impacted from wrong time service. And there is delay of time for about 30 seconds.
So TeamViewer IT Support folks, if this posslbe . Please fix this issue on your side. By the way I don't know if this issue is related to all versions of TeamViewer, but i'm using Version 13.