gpt4 book ai didi

火力地堡管理员 : when validating phone number "An internal error has occurred. Raw server response"

转载 作者:行者123 更新时间:2023-12-02 20:21:40 24 4
gpt4 key购买 nike

我正在使用 firebase admin 创建新用户。该用户有电话号码。当我像这样填写电话号码时“7777777”我的 firebase 管理员响应正确错误:

{ 
Error: The phone number must be a non-empty E.164 standard compliant identifier string.
at FirebaseAuthError.FirebaseError [as constructor]
...
...
errorInfo:
{ code: 'auth/invalid-phone-number',
message: 'The phone number must be a non-empty E.164 standard
compliant identifier string.'
},
codePrefix: 'auth' }

但是如果我像这样填写数字“+7777777”我的 firebase 管理员回复:

{ Error: An internal error has occurred. Raw server response: 
"{"error":{"code":400,"message":"INVALID_PHONE_NUMBER : TOO_SHORT","errors":
[{"message":"INVALID_PHONE_NUMBER : TOO_SHORT","domain":"global","reason":"invalid"}]}}"
at FirebaseAuthError.FirebaseError [as constructor] ...
errorInfo:
{ code: 'auth/internal-error',
message: 'An internal error has occurred. Raw server response:
"{"error":{"code":400,"message":"INVALID_PHONE_NUMBER :
TOO_SHORT","errors":
[{"message":"INVALID_PHONE_NUMBER :
TOO_SHORT","domain":"global","reason":"invalid"}]}}"'
},
codePrefix: 'auth' }

为什么我有这个内部错误?以及如何避免?

更新:我了解缺少国家代码。问题是。为什么是内部错误?而不是“普通”错误?这两个错误有什么区别。

最佳答案

当您将 moile no 传递给 firebase 时,您需要在手机号码之前添加您的国家/地区代码。

例如:

如果您的国家是美国(国家代码:+1)并且您的电话号码是 222-333-4444 那么您需要发送 +12223334444

也可以使用美国测试号来测试firebase mobile auth

下面是美国的测试号码和短信代码电话号码:“+16505554567”短信代码:“123456”

请在 https://firebase.google.com/docs/auth/android/phone-auth 阅读完整的详细信息

关于火力地堡管理员 : when validating phone number "An internal error has occurred. Raw server response",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51231138/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com