title: Phone number based Devise authentication for mobile apps
body: <p>We all know that Devise is de facto standard for implementing authentication on rails based apps. </p>
  
  <p>By default it uses email as ID but also allows you to use usernames instead. It also has "Confirmable" module which lets you confirm the email address by sending an email and clicking through the link to verify your email.</p>
  
  <p>I was looking for something similar for phone numbers--basically accepting phone numbers as primary ID instead of emails, and then confirm the phone number by sending an auth code as SMS message to the user's number via something like Twilio, and then let the user confirm it by entering the code (or even let the user click through a generated link to verify just like they do with emails)</p>
  
  <p>The reason I was expecting there to be a popular devise module for this functionality was because it seems as if most mobile social apps accept phone numbers and confirm the number nowadays. There's gotta be someone who thought this was a problem and open-sourced a module for this. However I couldn't find any popular ones. Actually to be precise, here are the only three relevant links I've found on this:</p>
  
  <ul>
  <li><a href="https://github.com/giano/devise_sms_activable" rel="noreferrer">https://github.com/giano/devise_sms_activable</a></li>
  <li><a href="https://github.com/baranov-sv/devise_sms_confirmable" rel="noreferrer">https://github.com/baranov-sv/devise_sms_confirmable</a></li>
  <li><a href="https://stackoverflow.com/questions/17771856/rails-register-user-using-phone-number-and-confirmation">Rails register User using phone number and confirmation</a></li>
  </ul>
  
  <p>None of them leads to a working solution (I've tried devise_sms_activable but it doesn't work for rails 4, plus I'm wary of the low number of stars) So I wanted to ask if there's any viable solution to this. Am I missing something? Has this topic been brought up among the Devise developer community? I'm curious about the solution but if there is none, I would at least appreciate any answer on why this is not readily available.</p>
  
  <p>[UPDATE] </p>
  
  <p>I think the question might have been a bit misleading. While I can just build it myself, I don't like to re-invent the wheel. 
  Basically my intention with this question was:</p>
  
  <ol>
  <li>If there's any package that does this (like all the modules such as confirmable, token_authentcatable, etc. Maybe not even a Devise module and it could be entirely a different thing) </li>
  <li>Or, if there is no such pre-built solution, why there isn't one. I just can't comprehend why there is no such solution I can find when everyone seems to be doing this.</li>
  </ol>
  
  <p>I will gladly accept when I get an answer to either #1 or #2. Thanks!</p>