This Firebase Function is responsible for verifying a user using Google's RECAPTCHA.
- Local NPM packages -->
npm install
npm run serve
This project uses Mocha. Run all tests via npm run test
.
SITEVERIFYURL
RECAPTCHASECRETKEY
curl --request GET \
--url http://localhost:5001/cruzhacks-4a899/us-central1/siteVerify \
--header 'token: RECAPTCHA_GENERATED_TOKEN' \
--header 'content-type: application/json' \
{
"error": false,
"status": 200,
"message": "Succesfully Authenticated Request"
}
{
"error": true,
"status": 401,
"message": "Token is missing"
}
{
"error": true,
"status": 400,
"message": "Invalid Token Provided"
}
{
"error": true,
"status": 400,
"message": "Invalid Token and Secret Provided"
}
{
"error": true,
"status": 401,
"message": "Incorrect Secret Provided"
}
{
"error": true,
"status": 400,
"message": "Request Timed Out or Sent Duplicate Key"
}
- Firebase Functions
- NodeJS
- Github Actions
- Mocha
- Prettier
- Eslint