Which is the best way to present to the user a 2-categories-login-field?

I have a login screen that has two ways of authentication: via e-mail or a numeric code.

So i'm wondering if i should make the user decide(use a tab-bar or a switch...) which kind of login auth he will be using and after that i present the matching keyboard when user presses on the auth field.

The other option would be to have a consolidated field with the ability to authenticate thru any, one of my biggest concerns in this one is that I cannot pull the numeric keypad to help user input the numbers with ease when using the numeric code to login.

What you guys think? Thanks for the help!