Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

短信验证一直Phone number is invalid #78

Open
Jian-Pumpking opened this issue Sep 26, 2023 · 3 comments
Open

短信验证一直Phone number is invalid #78

Jian-Pumpking opened this issue Sep 26, 2023 · 3 comments

Comments

@Jian-Pumpking
Copy link

启用阿里云的短信服务,然后linux中打印日志如下,
default region 'null' will be used
Error type: INVALID_COUNTRY_CODE. Missing or invalid default region.

,在页面上显示Phone number is invalid,我在启动的密令上也填了region

@Jeff-Tian
Copy link
Contributor

我用一般的手机号输入习惯重现了 Phone Number is Invalid 的错误,看了一下这个 provider 用了 https://github.com/google/libphonenumber 来校验手机号,它默认需要输入区号。

比如输入 13066667777 就会报错,但是输入:“+8613066667777” 就可以了。

你可以试试看 Phone Number is Invalid 的问题能不能解决?

WechatIMG338

@cooperlyt
Copy link
Owner

try this

--spi-phone-default-[$realm-]phone-default-region=CN

@GLY-JeffreyTCK
Copy link

@cooperlyt how to handle if multiple region code? Can it based on the E164 phone number passed in to auto switch region?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants