ReCaptcha密钥曾请求令牌(执行),但不再请求。为什么?

huangapple go评论133阅读模式
英文:

ReCaptcha key was requesting tokens (executes), but isn't anymore. Why?

问题

I implemented the ReCaptcha Enterprise in the android application as it is in the documentation (https://cloud.google.com/recaptcha-enterprise/docs/instrument-android-apps). The key was generated in the Google Cloud account. The recaptcha is used while registering the new user which data is saved in the backend API database.

private fun registerCall() {
    lifecycleScope.launch {
        recaptchaClient.execute(RecaptchaAction.SIGNUP)
            .onSuccess { captchaToken ->
                registerViewModel.register(
                    name = nameText,
                    surname = lastNameText,
                    email = emailText,
                    password = passwordText,
                    captchaToken = captchaToken
                )
            }
            .onFailure { exception ->
                registerFailed(getString(R.string.please_try_again_later))
            }
    }
}

The requests to the recaptcha are visible in the google cloud (so the initialization works great) but I also have an issue with ERROR.

英文:

I implemented the ReCaptcha Enterprise in the android application as it is in the documentation (https://cloud.google.com/recaptcha-enterprise/docs/instrument-android-apps). The key was generated in the Google Cloud account. The recaptcha is used while registering the new user which data is saved in the backend API database.

    private fun registerCall() {
        lifecycleScope.launch {
            recaptchaClient.execute(RecaptchaAction.SIGNUP)
                .onSuccess { captchaToken ->
                    registerViewModel.register(
                        name = nameText,
                        surname = lastNameText,
                        email = emailText,
                        password = passwordText,                     
                        captchaToken = captchaToken
                    )
                }
                .onFailure { exception ->
                    registerFailed(getString(R.string.please_try_again_later))
                }
        }
    }

The requests to the recaptcha are visible in the google cloud (so the initialization works great) but I also have an issue with ERROR:
ReCaptcha密钥曾请求令牌(执行),但不再请求。为什么?

The metrics visible in the Google Cloud:
ReCaptcha密钥曾请求令牌(执行),但不再请求。为什么?

答案1

得分: 0

在我的情况下,当天稍后我尝试在应用程序中请求令牌来使用reCAPTCHA,但提示消失了。错误消息从主要描述中的错误更改为:

"完成设置您的密钥:请求分数
要完全保护您的站点或应用程序,请完成设置您的密钥。您的密钥正在请求令牌(执行),但没有请求分数(评估)。”

这给了我正确的信息,表明尚未实施评估端点 - 还没有完成。我认为在一段时间内不使用/不请求reCAPTCHA令牌后,错误消息会变成:“您的密钥未请求令牌”(就像描述中所述)。第二天,我再次遇到了这个错误消息 - 所以在我的情况下,答案是未使用reCAPTCHA一段时间。

英文:

In my case I tried to use recaptcha later that day by requesting token in the app and the prompt was gone. The error changed from that from main description to:

"Finish setting up your key: Request scores <br>
To fully protect your site or app, finish setting up your key. Your key is requesting tokens (executes), but isn't requesting scores (assessments)."

Which gives me correct info about not implemented assessment endpoint - not done yet. I think that after some time of not using/not asking for recaptcha token the message error is: "Your key isn't requesting tokens" (like in the description). In the next day I again have this error message - so in my case the answer is the unused recaptcha for some time.

huangapple
  • 本文由 发表于 2023年6月13日 17:02:43
  • 转载请务必保留本文链接:https://go.coder-hub.com/76463289.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定