Twitter now supports 2-factor authenticator apps for enhanced security if you're the type of person who uses tools like Google Authenticator. While Twitter itself has supported 2-factor authentication for a while, support for third-party authenticator apps was not supported and this resulted in a little bit more of a challenge for users who were already set up with those apps. Sometime in the last few months though it would seem that Twitter actually added in support for apps like this which means users now have the option to link a code generator app with Twitter for this particular security purpose instead of having to strictly rely on Twitter's built-in method, which is to send an SMS to your phone number, which then has to be entered in for authentication to take place.
If you're using 2-factor authentication with the Twitter app on your device, then the setup should be fairly simple though you may not know right off the bat where to find the capability to add in a code generator app. The option is located in the Twitter app settings, under account. Having said that, it's worth noting that the option for setting up a code generator likely isn't going to show up if you don't have the 2FA security option enabled, so you'll want to enable this first if you haven't already done so.
From this step the process is rather straight forward. Just click the button for adding a code generator that should show up in the same settings window as where you enabled the option to set up 2-factor authentication, and choose the app that you have installed that generate codes for your login purposes. It's reported that removing your number link from the account disables 2-factor authentication, so you'll want to leave it connected. It should also be noted that this is strictly in regards to the official Twitter application and not just the service, which means users who are accessing Twitter through a third-party client like Talon or others may not be able to link a code generator app to their Twitter security settings unless the app already supports this feature as well.