Verified Commit d073b44c authored by Rigel Kent's avatar Rigel Kent
Browse files

recaptcha init

parent 3b14ca53
......@@ -2,4 +2,8 @@
PeerTube plugin adding ReCaptcha v2 to the signup
## Read First
This plugin is NOT supported by Framasoft, nor any organisation.
![](http://lutim.cpy.re/uWR04Q7m.png)
......@@ -39,7 +39,7 @@ function initRC(registerHook, peertubeHelpers) {
)
registerHook({
target: "filter:signup.register.body",
target: "filter:api.signup.registration.create.params",
handler: body =>
Object.assign({}, body, {
"g-recaptcha-response": window.ReCaptchaLoadCallbackResponse
......
......@@ -56,7 +56,7 @@ async function verifyCaptcha (result, params, settingsManager) {
"&response=" +
params.body["g-recaptcha-response"] +
"&remoteip=" +
params.connection.remoteAddress
params.ip
return get(verificationUrl, function (err, res, body) {
body = JSON.parse(body)
......
......@@ -3,7 +3,7 @@
"description": "PeerTube plugin adding ReCaptcha v2 to the signup",
"version": "0.0.1",
"author": "Rigel Kent",
"bugs": "https://framagit.org/framasoft/peertube/peertube-plugin-quickstart/issues",
"bugs": "https://framagit.org/framasoft/peertube/peertube-plugin-recaptcha/issues",
"clientScripts": [
{
"script": "dist/signup-client-plugin.js",
......@@ -30,7 +30,8 @@
"homepage": "https://framagit.org/framasoft/peertube/peertube-plugin-recaptcha",
"keywords": [
"peertube",
"plugin"
"plugin",
"captcha"
],
"library": "./main.js",
"license": "AGPL-3.0-or-later",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment