PiedTeam / NikeCloneTraining-BE-Project

0 stars 0 forks source link

Verify Token From Captcha #183

Open minatisleeping opened 3 months ago

minatisleeping commented 3 months ago

will receive you a token for you to decompose, containing fields like this:

Image

You need to send the secret key and token sent from the frontend into this api: TOKEN:receive from Frontend SECRET_KEY:Read from file .env backend Method:POST API:https://www.google.com/recaptcha/api/siteverify?secret=${SECRET_KEY}&response={TOKEN}

After you receive a response from Google, check to see if the score is > 0.5 or not. If yes, return true