Apple stops you from going crazy as two-factor authentication autofill is a feature of iOS 12
Two-factor authentication is considered a more secure method of signing in to an app. While many simply use their username and password to login, with two-factor authentication the initial login triggers the sending of a text message to a pre-set mobile number. That text usually contains a series of 4 or 6 numbers and letters that have to be submitted to enter the app.
Of course, you usually are bogged down in open apps, or are rushing around when the text message arrives with your code. You mumble it to yourself countless times to remember it just before a stranger approaches you and asks for the directions to 420 9th Avenue in the City. So you have to go back and remember the code. And just when you think you have it secured in your memory, a stranger asks you to recite pi to 10 digits. So you rattle off the answer, 3.141592653, but you forget the 6 digit code. Since most codes have a time limit, before you know it, the digits you memorized at last are no longer valid and you have to request a new text with a new code.
Well this will no longer be a problem once iOS 12 is installed on your iPhone. One of the new features of the latest iOS build will be autofill for two-factor authentication. The code that is being sent via text will automatically be placed in the proper field. Just submit, and you're in.
To see this glorious new feature in action, click on the video below.