Closed gbudiman closed 2 years ago
That is an interesting proposal. Do your users expect to fill in that detail in that format? Or do you already have their phone numbers in e164 format and you'd like to be able to send that data straight into the gem?
Would you be interested in working with me on implementing this feature?
@philnash TL;DR version: We'll write up a PR along with tests as soon as we have the time to (within 2 weeks).
Long version: some database enforces phone number normalization. So systems that interface with this kind of databases are required to add one more step to separate country code. It would be nicer if Twilio's Authy API supported this out of the box - unfortunately, support said "no, maybe later". We believe we can add a tiny adapter here, right before the actual HTTP POST is sent to the API endpoint.
Thanks
Sounds good to me. I look forward to your PR!
@philnash to answer your question, we already have the numbers in e164 format. @gbudiman will work on putting that PR together!
@philnash PR created https://github.com/twilio/authy-ruby/pull/44 Please review and let me know. Thanks
Closed #44, but still willing to accept a PR on this if you want to add this functionality without requiring phony
!
Closing this issue as we are now deprecating the library. Please see the README for more details on what to do next.
Authy::API.register_user
should intelligently handle normalized phone number, instead of requiring formatted one, separate from country code.E.g. it should be able to handle
+464790909090
without having to supply separate input of+46
and4790909090