I just encounter the problem today. Attempt login to App Store Connect directly on Safari. I got the two-factor code alert, but also the failed to verify message in the browser with nowhere to enter the 2-factor code. I instead went to developer.apple.com and was able to successfully log in there, and then clicked over to App Store Connect successfully.
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags: