Telephone input (+ country code)

I am asked to improve the sign-up process of a double authentication system.

At one step there, we ask users to input their telephone number. Right now users have to click on the flag and choose their country's flag through the dropdown. This is quite tedious.

enter image description here

I am thinking that the name of the country should be somehow searchable, users should be able to directly input the country code as well.

I am trying to find what others are doing but I haven't succeeded in finding anything great. Have you worked on anything like this?

Thanks!

A first thought would be something like this: enter image description here