cooperlyt / keycloak-phone-provider

A Keycloak provider for phone and SMS
MIT License
286 stars 159 forks source link

Need mechanism to restrict phone numbers. #38

Closed RossRogers closed 1 year ago

RossRogers commented 1 year ago

Hi @cooperlyt ,

I see that the --spi-phone-default-number-regx option was removed. I would still like to be able to use that feature in addition to --spi-phone-default-canonicalize-phone-numbers=true, because of SMS + shady telco issue: https://news.ycombinator.com/item?id=34847650

Basically, folks can scam your SMS service and rack up SMS costs with AWS or twilio or whomever. If you have a regex, then at least you can restrict telephone numbers some. I was going to use the --spi-phone-default-number-regx to restrict numbers to something like ^\+1 509 \d{3}-\d{4}$, which would be cell numbers in a particular region of the USA.

cooperlyt commented 1 year ago

you are right, --spi-phone-default-number-regx will be back.

cooperlyt commented 1 year ago

--spi-phone-default-number-regx change to --spi-phone-default-number-regex and will match canonicalize after