Do you want your users to be able to login using a password or using OTP? You could customize one of the existing recipes like the EmailPassword or Passwordless. It might be possible but you're going to have to do a lot of customization to achieve this.
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).