upon registering as user to an app, A user will need to enter his phone number and get an SMS with a code, which he needs to enter to continue with registration.

on the next screen, the user is also required to enter a password which may be used if he logs out of the app. 

My question is, are passwords still needed if SMS can be used to login ?
in other words, isn't SMS enough to complete a registration ? do we still need the use of a password ?