Firebase 3 - 由于异常 activity,我们已阻止来自此设备的所有请求
Firebase 3 - We have blocked all requests from this device due to unusual activity
我正在测试我的 login/sign up 功能,但出于某种原因我无法理解 Firebase 现在阻止了来自我设备的所有请求。
等了一天再试,还是一样的问题
ERROR:
"We have blocked all requests from this device due to unusual activity. Try again later."
我应该怎么做才能再次访问我的数据库?
可能的解决方案之一:
转到您的 Firebase 控制台 -> 身份验证 -> 用户 table
找到您正在测试的用户。
删除该用户。
重新测试。
这是我 运行 遇到的众多怪癖之一。虽然 Firebase 似乎是一个不错的 framework/product/service,但目前它似乎还没有完全准备好进行广泛的生产部署。在这种情况下,我只使用了一个特定的(假的)用户 testing/debugging 并且仅在几次尝试(可能不超过 10 次登录)之后,我 运行 进入了这个问题。有趣的是,我的测试在每个 运行 之后删除了假测试用户,所以之后我在我的 auth 用户 table 中看不到任何用户。我的解决方案是通过 "ADD USER" 按钮手动添加该用户,然后将其删除。我认为他们应该(至少作为一种解决方法)为 testing/debugging 定义一个不受此限制的用户,如果他们真的觉得他们必须有这样的(低)限制。
在
查看我的回答
I went into firebase > Authentication > sign-in method > google and added my client id to the whitelist.
我通过重置用户密码设法让这个工作立即生效。
步骤如下:
- 进入您的管理控制台,身份验证,用户
- 找到用户
- 单击最右侧列中的菜单点
- 选择重置密码,然后点击确定
- 收到电子邮件后按照电子邮件中的步骤操作
我 运行 遇到了同样的问题。
默认情况下(对于免费计划),firebase 将每个 IP 地址的登录次数限制为每小时 100 次。
这破坏了我们的自动化测试。您可以像这样更改设置:
- 打开控制台
- 打开您的项目
- 转到"authentication"
- 转到"sign-in method"
- 向下滚动到 "manage sign-in quota"
就是这样。目前此配额的最大设置为每小时 1000 个
.
如果您使用 Phone 身份验证,请执行以下操作:
- 转到 Firebase 控制台
- 身份验证 ==> 登录方法
- 转到 "Phone",弹出窗口将显示
- 在“Phone 用于测试的号码”处添加您的 phone 号码以及来自的 验证码 你的选择。
现在可以使用了:)
我联系了 firebase 支持并收到了这条消息:
The error "We have blocked all requests from this device due to
unusual activity. Try again later." is usually thrown when a user is
making SMS authentication requests to a certain number of times using
the same phone number or IP address. These repeated requests are
considered as a suspicious behavior which temporarily blocks the
device or IP address.
Additionally, there's a limit of 5 SMS per phone number per 4 hours.
With this, you may try doing the following to resolve the issue:
Reduce the frequency of attempts to avoid triggering the anti-abuse
system Try using whitelisted phone numbers for testing your app
Use multiple testing devices (as the limits are applied per IP or
device) Wait for an hour for the quota to lift
我尝试按照 增加配额,但答案是
以下:
You also mentioned that you have increased the quota to
1000 but it didn't work. Do note that this "Manage to sign up quota"
field is intended for Email/Password and Anonymous sign-ups.
我已经在登录方法选项卡中添加了我的 phone 作为测试号码。
实际上这个错误是在超过配额限制时发生的。
只需添加您的号码并测试一次性密码即可。
Note: The testing number will not get any message of OTP as we already
defined static OTP code.
我遇到了同样的问题,我通过购买 Blaze 计划解决了这个问题。这种阻止似乎是 Firebase 方面的一项安全措施。
如果您将 Firebase 用于开发目的,购买 Blaze 计划不会花费您任何费用,因为它与 Spark 计划中提供的免费服务配额相同。
其中一个原因可能是在短时间内向用户的电子邮箱发送了太多验证电子邮件。尝试添加持续时间计时器并检查验证消息是否已在持续时间内发送。
将您的那个号码作为测试人员添加到 Firebase。这样你就可以尽可能多地测试它。
否则从一个号码到一个项目的多个请求。 Firebase 将其视为黑客并加以阻止。
将您的号码添加为测试员:
去
-> Firebase 控制台 -> 身份验证 -> 登录方法 -> 编辑 Phone -> Phone 用于测试的数字(可选)
添加您的 phone 号码和您选择的验证码,然后该号码就可以使用了。
你不会从firebase获取验证码,但你可以给你设置的验证码作为测试人员,可以通过phone
登录
如果您正在进行测试,更好的方法是添加 phone 号码作为测试号码身份验证 > 登录方法 > Phone。然后加上测试号+你要用的验证码
此外,设置 Firebase Auth 测试 phone 号码应该会有帮助。
每 https://firebase.google.com/docs/auth/ios/phone-auth#test-with-fictional-phone-numbers:
用虚构的 phone 数字进行测试
您可以通过 Firebase 控制台为开发设置虚构的 phone 号码。使用虚构的 phone 数字进行测试具有以下优势:
- 在不消耗您的使用配额的情况下测试 phone 号码验证。
- 在不发送实际 SMS 消息的情况下测试 phone 号码身份验证。
运行 使用相同的 phone 数字连续测试而不会受到限制。如果审阅者碰巧使用相同的 phone 号码进行测试,这可以最大限度地降低在 App 商店审阅过程中被拒绝的风险。
- 无需任何额外工作即可在开发环境中轻松进行测试,例如无需 Google Play 服务即可在 iOS 模拟器或 Android 模拟器中进行开发的能力。
- 编写集成测试,而不会被通常应用于生产环境中真实 phone 数字的安全检查所阻止。
虚构 phone 号码必须满足这些要求:
请确保您使用的 phone 数字确实是虚构的,并且不存在。 Firebase 身份验证不允许您将真实用户使用的现有 phone 号码设置为测试号码。
一种选择是使用 555 前缀号码作为美国测试 phone 号码,例如:+1 650-555-3434
Phone 数字必须根据长度和其他限制正确格式化。他们仍将通过与真实用户的 phone 号码相同的验证。
您最多可以添加 10 个 phone 个号码进行开发。
使用难以猜测的测试 phone numbers/codes 并经常更改它们。
创建虚构的phone号码和验证码
- 在 Firebase 控制台中,打开身份验证部分。
- 在“登录方法”选项卡中,启用 Phone 提供程序(如果您尚未启用)。
- 打开 Phone 手风琴测试号码菜单。
- 提供您要测试的 phone 号码,例如:+1 650-555-3434。
- 提供该特定号码的 6 位验证码,例如:654321。
- 添加号码。如果需要,您可以将鼠标悬停在相应行上并单击垃圾桶图标,以删除 phone 号码及其代码。
The error "We have blocked all requests from this device due to unusual activity. Try again later." is usually thrown when a user is making SMS authentication requests to a certain number of times using the same phone number or IP address. These repeated requests are considered as a suspicious behavior which temporarily blocks the device or IP address.
Additionally, there's a limit of 5 SMS per phone number per 4 hours. With this, you may try doing the following to resolve the issue:
Reduce the frequency of attempts to avoid triggering the anti-abuse system Try using whitelisted phone numbers for testing your app Use multiple testing devices (as the limits are applied per IP or device) Wait for an hour for the quota to lift
我正在测试我的 login/sign up 功能,但出于某种原因我无法理解 Firebase 现在阻止了来自我设备的所有请求。
等了一天再试,还是一样的问题
ERROR: "We have blocked all requests from this device due to unusual activity. Try again later."
我应该怎么做才能再次访问我的数据库?
可能的解决方案之一:
转到您的 Firebase 控制台 -> 身份验证 -> 用户 table
找到您正在测试的用户。
删除该用户。
重新测试。
这是我 运行 遇到的众多怪癖之一。虽然 Firebase 似乎是一个不错的 framework/product/service,但目前它似乎还没有完全准备好进行广泛的生产部署。在这种情况下,我只使用了一个特定的(假的)用户 testing/debugging 并且仅在几次尝试(可能不超过 10 次登录)之后,我 运行 进入了这个问题。有趣的是,我的测试在每个 运行 之后删除了假测试用户,所以之后我在我的 auth 用户 table 中看不到任何用户。我的解决方案是通过 "ADD USER" 按钮手动添加该用户,然后将其删除。我认为他们应该(至少作为一种解决方法)为 testing/debugging 定义一个不受此限制的用户,如果他们真的觉得他们必须有这样的(低)限制。
在
查看我的回答I went into firebase > Authentication > sign-in method > google and added my client id to the whitelist.
我通过重置用户密码设法让这个工作立即生效。
步骤如下:
- 进入您的管理控制台,身份验证,用户
- 找到用户
- 单击最右侧列中的菜单点
- 选择重置密码,然后点击确定
- 收到电子邮件后按照电子邮件中的步骤操作
我 运行 遇到了同样的问题。
默认情况下(对于免费计划),firebase 将每个 IP 地址的登录次数限制为每小时 100 次。 这破坏了我们的自动化测试。您可以像这样更改设置:
- 打开控制台
- 打开您的项目
- 转到"authentication"
- 转到"sign-in method"
- 向下滚动到 "manage sign-in quota"
就是这样。目前此配额的最大设置为每小时 1000 个
如果您使用 Phone 身份验证,请执行以下操作:
- 转到 Firebase 控制台
- 身份验证 ==> 登录方法
- 转到 "Phone",弹出窗口将显示
- 在“Phone 用于测试的号码”处添加您的 phone 号码以及来自的 验证码 你的选择。
现在可以使用了:)
我联系了 firebase 支持并收到了这条消息:
The error "We have blocked all requests from this device due to unusual activity. Try again later." is usually thrown when a user is making SMS authentication requests to a certain number of times using the same phone number or IP address. These repeated requests are considered as a suspicious behavior which temporarily blocks the device or IP address.
Additionally, there's a limit of 5 SMS per phone number per 4 hours. With this, you may try doing the following to resolve the issue:
Reduce the frequency of attempts to avoid triggering the anti-abuse system Try using whitelisted phone numbers for testing your app Use multiple testing devices (as the limits are applied per IP or device) Wait for an hour for the quota to lift
我尝试按照
You also mentioned that you have increased the quota to 1000 but it didn't work. Do note that this "Manage to sign up quota" field is intended for Email/Password and Anonymous sign-ups.
我已经在登录方法选项卡中添加了我的 phone 作为测试号码。
实际上这个错误是在超过配额限制时发生的。
只需添加您的号码并测试一次性密码即可。
Note: The testing number will not get any message of OTP as we already defined static OTP code.
我遇到了同样的问题,我通过购买 Blaze 计划解决了这个问题。这种阻止似乎是 Firebase 方面的一项安全措施。 如果您将 Firebase 用于开发目的,购买 Blaze 计划不会花费您任何费用,因为它与 Spark 计划中提供的免费服务配额相同。
其中一个原因可能是在短时间内向用户的电子邮箱发送了太多验证电子邮件。尝试添加持续时间计时器并检查验证消息是否已在持续时间内发送。
将您的那个号码作为测试人员添加到 Firebase。这样你就可以尽可能多地测试它。 否则从一个号码到一个项目的多个请求。 Firebase 将其视为黑客并加以阻止。
将您的号码添加为测试员: 去 -> Firebase 控制台 -> 身份验证 -> 登录方法 -> 编辑 Phone -> Phone 用于测试的数字(可选)
添加您的 phone 号码和您选择的验证码,然后该号码就可以使用了。
你不会从firebase获取验证码,但你可以给你设置的验证码作为测试人员,可以通过phone
登录如果您正在进行测试,更好的方法是添加 phone 号码作为测试号码身份验证 > 登录方法 > Phone。然后加上测试号+你要用的验证码
此外,设置 Firebase Auth 测试 phone 号码应该会有帮助。
每 https://firebase.google.com/docs/auth/ios/phone-auth#test-with-fictional-phone-numbers:
用虚构的 phone 数字进行测试
您可以通过 Firebase 控制台为开发设置虚构的 phone 号码。使用虚构的 phone 数字进行测试具有以下优势:
- 在不消耗您的使用配额的情况下测试 phone 号码验证。
- 在不发送实际 SMS 消息的情况下测试 phone 号码身份验证。 运行 使用相同的 phone 数字连续测试而不会受到限制。如果审阅者碰巧使用相同的 phone 号码进行测试,这可以最大限度地降低在 App 商店审阅过程中被拒绝的风险。
- 无需任何额外工作即可在开发环境中轻松进行测试,例如无需 Google Play 服务即可在 iOS 模拟器或 Android 模拟器中进行开发的能力。
- 编写集成测试,而不会被通常应用于生产环境中真实 phone 数字的安全检查所阻止。
虚构 phone 号码必须满足这些要求:
请确保您使用的 phone 数字确实是虚构的,并且不存在。 Firebase 身份验证不允许您将真实用户使用的现有 phone 号码设置为测试号码。
一种选择是使用 555 前缀号码作为美国测试 phone 号码,例如:+1 650-555-3434Phone 数字必须根据长度和其他限制正确格式化。他们仍将通过与真实用户的 phone 号码相同的验证。
您最多可以添加 10 个 phone 个号码进行开发。
使用难以猜测的测试 phone numbers/codes 并经常更改它们。
创建虚构的phone号码和验证码
- 在 Firebase 控制台中,打开身份验证部分。
- 在“登录方法”选项卡中,启用 Phone 提供程序(如果您尚未启用)。
- 打开 Phone 手风琴测试号码菜单。
- 提供您要测试的 phone 号码,例如:+1 650-555-3434。
- 提供该特定号码的 6 位验证码,例如:654321。
- 添加号码。如果需要,您可以将鼠标悬停在相应行上并单击垃圾桶图标,以删除 phone 号码及其代码。
The error "We have blocked all requests from this device due to unusual activity. Try again later." is usually thrown when a user is making SMS authentication requests to a certain number of times using the same phone number or IP address. These repeated requests are considered as a suspicious behavior which temporarily blocks the device or IP address.
Additionally, there's a limit of 5 SMS per phone number per 4 hours. With this, you may try doing the following to resolve the issue:
Reduce the frequency of attempts to avoid triggering the anti-abuse system Try using whitelisted phone numbers for testing your app Use multiple testing devices (as the limits are applied per IP or device) Wait for an hour for the quota to lift