title: register user by email or mobile number in django
body: <p>i have custom user model with email as unique identifier for auth instead of username. i want register a user by email or mobile number. if user enter email address, then register user by activation link, and if user enter phone number then register by SMS OTP.</p>
  
  <p>something like instagram registration:</p>
  
  <p><a href="https://www.instagram.com/accounts/emailsignup/" rel="nofollow noreferrer">https://www.instagram.com/accounts/emailsignup/</a></p>
  
  <p>i found <a href="https://stackoverflow.com/questions/39649485/login-register-using-phone-or-email-for-django-allauth-integration">this</a> topic but the answer is not explained well.</p>