Our app does authorization against multiple providers, depending on the user.
Recently we noticed that our users were getting the same error when trying to get authorization against one provider only. I looked into it, and I noticed that this provider was setting up 2FA automatically for all their new users.
So I disabled 2FA for my test account, logged out and refreshed the browser. Then the authorization process started working fine. And, if I enable 2FA, it starts failing again. It also helps if I uncheck the box that says "Skip this step next time" when I enter the 2FA code.
Unfortunately this workaround doesn't work for some other users. We haven't been able to determine what is the ultimate solution.
I hope this helps others trying to find the root cause of the problem.