We found that if a user copy/paste of login code includes leading or trailing spaces or tabs the UI complains that it is an invalid code instead of just trimming the tab or space off and proceeding with the request.
The mailed code and the pasted code look exactly the same to the user.
The problem is similar to a previously reported and resolved issue for email address
I have submitted this bug report to our Engineering teams, and they have included this item in the backlog to fix it. However, we don’t have an exact ETA as to when this will be fixed.