[go: nahoru, domu]

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

Score is always 0.8999999761581421, even for automated tests in @google-cloud/recaptcha-enterprise #5398

Open
yossi-chen opened this issue May 29, 2024 · 0 comments

Comments

@yossi-chen
Copy link

I've implemented the recaptcha enterprise widget on my site, but the score that returns from the assesment is always the same - 0.8999999761581421
even for my e2e tests which are running via playwright

Environment details

  • which product (packages/*):
    "@google-cloud/recaptcha-enterprise": "^5.9.0",
  • OS: Mac/Linux
  • Node.js version: v16.18.1
  • npm version: 8.19.2

Steps to reproduce

I'm using the code example from their integration example in the gcp console. The token is generated in the frontend.

const { RecaptchaEnterpriseServiceClient } = require('@google-cloud/recaptcha-enterprise');

class ReCaptchaService {
	async createAssessment({ ... }) {
		const credentials = ...
		const client = new RecaptchaEnterpriseServiceClient({ credentials });
		const projectPath = client.projectPath(projectID);

		const request = {
			assessment: {
				event: {
					token,
					siteKey: recaptchaKey,
				},
			},
			parent: projectPath,
		};

		const [response] = await client.createAssessment(request);

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

1 participant