mirror of
https://github.com/nextcloud/twofactor_gateway.git
synced 2026-04-25 09:05:55 +03:00
[GH-ISSUE #327] Phone number verification - Need to specify country code. #72
Labels
No labels
0. to triage
1. to develop
3. to review
blocked
bug
discussion
duplicate
enhancement
enhancement
gateway:signal
gateway:signal
gateway:signal
gateway:sms
gateway:telegram
hacktoberfest
help wanted
invalid
needs info
php
pull-request
question
technical debt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/twofactor_gateway-nextcloud#72
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nolsen42 on GitHub (Feb 25, 2020).
Original GitHub issue: https://github.com/nextcloud/twofactor_gateway/issues/327
Certain SMS services (at least with sms77.io) will send SMS messages to the wrong person if the user doesn't specify their country code, which is a common thing to omit when entering their number. It'd be a good idea if the app specifically tells you to enter a country code, or a dropdown box with all the country codes of the world.
@ChristophWurst commented on GitHub (Feb 25, 2020):
This is hard to implement because we support so many providers. And everyone of them has their own format, unfortunately.
@cdjenkins commented on GitHub (Jun 1, 2020):
One option is to have all number in E.164 format (which specifies the country code): https://developers.omnisend.com/guides/e164-phone-number-formatting
https://support.plivo.com/support/solutions/articles/17000042303-do-i-need-to-add-country-code-while-dialling-out-
@ChristophWurst commented on GitHub (Jun 2, 2020):
Yet we'd then have to convert it into the format the the specific provider excepts, right?
@cdjenkins commented on GitHub (Jun 2, 2020):
Option #1) Only accept E.164 or few acceptable formats. No need to accept 10 number formats.
Option #2) Have each app handle phone number formats specific to itself
@ChristophWurst commented on GitHub (Jun 3, 2020):
In terms of UI complexity I'd favor option 1 because we can focus on one format. Then each of the providers can convert the number into any other format if necessary.
@boppy commented on GitHub (Jun 3, 2020):
Absolutely! And E.164 is commonly used and known (not the name, but the format ;-))... Question is validation. I'm in for
^\+?[1-9]\d{1,14}$(src) as storage regex and^\+?[1-9][\d\s]{1,20}$for User Input.@j-ed commented on GitHub (Jun 3, 2020):
If you create any input check you should have in mind that countries exist, like e.g. Liechtenstein, where no area codes exist. A number is formatted like this: +423 99887766 😉
@boppy commented on GitHub (Jun 3, 2020):
Yes, that's why I don't like any "advanced" check. The Regex pasted just ensures that
+(we might/should make this required to avoid problems)All this, for sure, tbd.