karser / KarserRecaptcha3Bundle

Google ReCAPTCHA v3 for Symfony
MIT License
158 stars 21 forks source link

Unable to run in a API orientation #65

Open joe97228 opened 8 months ago

joe97228 commented 8 months ago

Hi everyone!

my application environnement is: -> angular 16 (i use postMan to test this login endPoint) -> SF 6 ---> LexikJWTAuthenticationBundle

`###> karser/karser-recaptcha3-bundle ### RECAPTCHA3_KEY=xxxxxxxx RECAPTCHA3_SECRET=xxxx RECAPTCHA3_ENABLED=1

< karser/karser-recaptcha3-bundle ###`

`#config/validator/validation.yaml App\Dto\UserSignupRequest: properties: email:

karser_recaptcha3: site_key: '%env(RECAPTCHA3_KEY)%' secret_key: '%env(RECAPTCHA3_SECRET)%' score_threshold: 0.7 enabled: true

{ "type": "project", "license": "proprietary", "minimum-stability": "stable", "prefer-stable": true, "require": { "php": ">=8.1", "ext-ctype": "*", "ext-iconv": "*", "doctrine/doctrine-bundle": "^2.10", "doctrine/doctrine-migrations-bundle": "^3.0", "doctrine/orm": "^2.16", "egulias/email-validator": "^4.0", "friendsofsymfony/rest-bundle": "^3.5", "gesdinet/jwt-refresh-token-bundle": "^1.1", "jms/serializer-bundle": "^5.3", "karser/karser-recaptcha3-bundle": "^0.1.24", "lexik/jwt-authentication-bundle": "^2.19", "nelmio/api-doc-bundle": "^4.12", "nelmio/cors-bundle": "^2.3", "symfony/asset": "6.3.*", "symfony/console": "6.3.*", "symfony/dotenv": "6.3.*", "symfony/flex": "^2", "symfony/framework-bundle": "6.3.*", "symfony/runtime": "6.3.*", "symfony/twig-bundle": "6.3.*", "symfony/yaml": "6.3.*" }

I have been following the different steps until the API orientation part.

Am i suppose to be able to run this bundle at this part of the configuration procedure? I haven't got any error even if I do not send the reCaptcha token.

--> (@POST)http://localhost:8000/api/login_check --> { "password":"test", "email":"test@jojo.com", "captcha" : ""

}

thank you all for the returns :-)